multilevel.ll 688 B

123456789101112131415161718192021222324252627282930
  1. ; This testcase ensures that CFL AA handles trivial cases with storing
  2. ; pointers in pointers appropriately.
  3. ; Derived from:
  4. ; char a, b;
  5. ; char *m = &a, *n = &b;
  6. ; *m;
  7. ; *n;
  8. ; RUN: opt < %s -cfl-aa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s
  9. %T = type { i32, [10 x i8] }
  10. ; CHECK: Function: test
  11. define void @test() {
  12. ; CHECK: 15 Total Alias Queries Performed
  13. ; CHECK: 13 no alias responses
  14. %M = alloca %T*, align 8
  15. %N = alloca %T*, align 8
  16. %A = alloca %T, align 8
  17. %B = alloca %T, align 8
  18. store %T* %A, %T** %M
  19. store %T* %B, %T** %N
  20. %AP = load %T*, %T** %M ; PartialAlias with %A
  21. %BP = load %T*, %T** %N ; PartialAlias with %B
  22. ret void
  23. }