2003-09-19-LocalArgument.ll 345 B

123456789101112131415
  1. ; In this test, a local alloca cannot alias an incoming argument.
  2. ; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s
  3. ; CHECK: define i32 @test
  4. ; CHECK-NEXT: ret i32 0
  5. define i32 @test(i32* %P) {
  6. %X = alloca i32
  7. %V1 = load i32, i32* %P
  8. store i32 0, i32* %X
  9. %V2 = load i32, i32* %P
  10. %Diff = sub i32 %V1, %V2
  11. ret i32 %Diff
  12. }