summaryrefslogtreecommitdiff
path: root/test/Transforms/DeadStoreElimination
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-05-23 05:15:43 +0000
committerChris Lattner <sabre@nondot.org>2011-05-23 05:15:43 +0000
commitc10ecd8f23ebb4541acbe18563b7f19c4f79e721 (patch)
tree95110640ff4dc7bb0cf791c0a2881caff3246e51 /test/Transforms/DeadStoreElimination
parentd34d429401187f4251c38323a1bc517bc96763b9 (diff)
downloadllvm-c10ecd8f23ebb4541acbe18563b7f19c4f79e721.tar.gz
llvm-c10ecd8f23ebb4541acbe18563b7f19c4f79e721.tar.bz2
llvm-c10ecd8f23ebb4541acbe18563b7f19c4f79e721.tar.xz
fix a really nasty basicaa mod/ref calculation bug that was causing miscompilation of
UnitTests/ObjC/messages-2.m with the recent optimizer improvements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/DeadStoreElimination')
-rw-r--r--test/Transforms/DeadStoreElimination/simple.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/DeadStoreElimination/simple.ll b/test/Transforms/DeadStoreElimination/simple.ll
index a61eac9729..23576dadcf 100644
--- a/test/Transforms/DeadStoreElimination/simple.ll
+++ b/test/Transforms/DeadStoreElimination/simple.ll
@@ -236,3 +236,20 @@ define void @test18(i8* %P, i8* %Q, i8* %R) nounwind ssp {
; CHECK-NEXT: call void @llvm.memcpy
; CHECK-NEXT: ret
}
+
+
+; The store here is not dead because the byval call reads it.
+declare void @test19f({i32}* byval align 4 %P)
+
+define void @test19({i32} * nocapture byval align 4 %arg5) nounwind ssp {
+bb:
+ %tmp7 = getelementptr inbounds {i32}* %arg5, i32 0, i32 0
+ store i32 912, i32* %tmp7
+ call void @test19f({i32}* byval align 4 %arg5)
+ ret void
+
+; CHECK: @test19(
+; CHECK: store i32 912
+; CHECK: call void @test19f
+}
+