diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-18 04:55:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-18 04:55:26 +0000 |
commit | e62b2633e8c782f8805bbcb13d92179f179d6143 (patch) | |
tree | c5ac8008496a0df3007a1a0ada0e8c608c39f411 /test/Analysis | |
parent | 6e85d91144ef563963be2782a5561a1a6bb088b8 (diff) | |
download | external_llvm-e62b2633e8c782f8805bbcb13d92179f179d6143.zip external_llvm-e62b2633e8c782f8805bbcb13d92179f179d6143.tar.gz external_llvm-e62b2633e8c782f8805bbcb13d92179f179d6143.tar.bz2 |
tighten up test3, add test3a for the converse
transform, which isn't happening yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/BasicAA/modref.ll | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/test/Analysis/BasicAA/modref.ll b/test/Analysis/BasicAA/modref.ll index a089864..07d73a7 100644 --- a/test/Analysis/BasicAA/modref.ll +++ b/test/Analysis/BasicAA/modref.ll @@ -51,7 +51,10 @@ define i8 @test2(i8* %P) { define i8 @test2a(i8* %P) { ; CHECK: @test2 %P2 = getelementptr i8* %P, i32 126 + + ;; FIXME: DSE isn't zapping this dead store. 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 @@ -59,14 +62,30 @@ define i8 @test2a(i8* %P) { ; CHECK: ret i8 %A } -define void @test3(i8* %P) { +define void @test3(i8* %P, i8 %X) { ; CHECK: @test3 +; CHECK-NOT: store +; CHECK-NOT: %Y + %Y = add i8 %X, 1 ;; Dead, because the only use (the store) is dead. + %P2 = getelementptr i8* %P, i32 2 - store i8 1, i8* %P2 ;; Not read by lifetime.end -; CHECK: store + store i8 %Y, i8* %P2 ;; Not read by lifetime.end, should be removed. +; CHECK: store i8 2, i8* %P2 call void @llvm.lifetime.end(i64 1, i8* %P) store i8 2, i8* %P2 ; CHECK-NOT: store ret void ; CHECK: ret void +} + +define void @test3a(i8* %P, i8 %X) { +; CHECK: @test3a + %Y = add i8 %X, 1 ;; Dead, because the only use (the store) is dead. + + %P2 = getelementptr i8* %P, i32 2 + store i8 %Y, i8* %P2 ;; FIXME: Killed by llvm.lifetime.end, should be zapped. +; CHECK: store i8 2, i8* %P2 + call void @llvm.lifetime.end(i64 10, i8* %P) + ret void +; CHECK: ret void }
\ No newline at end of file |