basic-interproc-ret.ll 688 B

1234567891011121314151617181920212223242526
  1. ; This testcase ensures that CFL AA gives conservative answers on variables
  2. ; that involve arguments.
  3. ; RUN: opt < %s -cfl-aa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s
  4. ; CHECK: Function: test
  5. ; CHECK: 4 Total Alias Queries Performed
  6. ; CHECK: 3 no alias responses
  7. ; ^ The 1 MayAlias is due to %arg1. Sadly, we don't currently have machinery
  8. ; in place to check whether %arg1 aliases %a, because BasicAA takes care of
  9. ; that for us.
  10. define i32* @test2(i32* %arg1) {
  11. store i32 0, i32* %arg1
  12. %a = alloca i32, align 4
  13. ret i32* %a
  14. }
  15. define void @test() {
  16. %a = alloca i32, align 4
  17. %b = alloca i32, align 4
  18. %c = call i32* @test2(i32* %a)
  19. ret void
  20. }