arguments-globals.ll 640 B

1234567891011121314151617181920
  1. ; This testcase ensures that CFL AA gives conservative answers on variables
  2. ; that involve arguments.
  3. ; (Everything should alias everything, because args can alias globals, so the
  4. ; aliasing sets should of args+alloca+global should be combined)
  5. ; RUN: opt < %s -cfl-aa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s
  6. ; CHECK: Function: test
  7. @g = external global i32
  8. define void @test(i1 %c, i32* %arg1, i32* %arg2) {
  9. ; CHECK: 15 Total Alias Queries Performed
  10. ; CHECK: 0 no alias responses
  11. %A = alloca i32, align 4
  12. %B = select i1 %c, i32* %arg1, i32* %arg2
  13. %C = select i1 %c, i32* @g, i32* %A
  14. ret void
  15. }