diff options
Diffstat (limited to 'test/Analysis/BasicAA/modref.ll')
-rw-r--r-- | test/Analysis/BasicAA/modref.ll | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/Analysis/BasicAA/modref.ll b/test/Analysis/BasicAA/modref.ll index b3d93ac..a089864 100644 --- a/test/Analysis/BasicAA/modref.ll +++ b/test/Analysis/BasicAA/modref.ll @@ -40,7 +40,7 @@ define i8 @test1() { define i8 @test2(i8* %P) { ; CHECK: @test2 - %P2 = getelementptr i8* %P, i32 1000 + %P2 = getelementptr i8* %P, i32 127 store i8 1, i8* %P2 ;; Not dead across memset call void @llvm.memset.i8(i8* %P, i8 2, i8 127, i32 0) %A = load i8* %P2 @@ -48,6 +48,17 @@ define i8 @test2(i8* %P) { ; CHECK: ret i8 1 } +define i8 @test2a(i8* %P) { +; CHECK: @test2 + %P2 = getelementptr i8* %P, i32 126 + store i8 1, i8* %P2 ;; Dead, clobbered by memset. + call void @llvm.memset.i8(i8* %P, i8 2, i8 127, i32 0) + %A = load i8* %P2 + ret i8 %A +; CHECK: %A = load i8* %P2 +; CHECK: ret i8 %A +} + define void @test3(i8* %P) { ; CHECK: @test3 %P2 = getelementptr i8* %P, i32 2 |