diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-18 04:50:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-18 04:50:18 +0000 |
commit | 6e85d91144ef563963be2782a5561a1a6bb088b8 (patch) | |
tree | 07992d943b5a59298daa0f8ce815e51e56d3df7d /test/Analysis | |
parent | 15d3c05adf7f133f4eb5264e4e9b31cdc60f39eb (diff) | |
download | external_llvm-6e85d91144ef563963be2782a5561a1a6bb088b8.zip external_llvm-6e85d91144ef563963be2782a5561a1a6bb088b8.tar.gz external_llvm-6e85d91144ef563963be2782a5561a1a6bb088b8.tar.bz2 |
tighten test2, add a test that it doesn't get transformed in the invalid edge case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-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 |