multilevel-combine.ll 728 B

12345678910111213141516171819202122232425262728293031
  1. ; This testcase ensures that CFL AA responds conservatively when we union
  2. ; groups of pointers together through ternary/conditional operations
  3. ; Derived from:
  4. ; void foo(bool c) {
  5. ; char a, b;
  6. ; char *m = c ? &a : &b;
  7. ; *m;
  8. ; }
  9. ;
  10. ; RUN: opt < %s -cfl-aa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s
  11. %T = type { i32, [10 x i8] }
  12. ; CHECK: Function: test
  13. define void @test(i1 %C) {
  14. ; CHECK: 10 Total Alias Queries Performed
  15. ; CHECK: 4 no alias responses
  16. %M = alloca %T*, align 8 ; NoAlias with %A, %B, %MS, %AP
  17. %A = alloca %T, align 8
  18. %B = alloca %T, align 8
  19. %MS = select i1 %C, %T* %B, %T* %A
  20. store %T* %MS, %T** %M
  21. %AP = load %T*, %T** %M ; PartialAlias with %A, %B
  22. ret void
  23. }