summaryrefslogtreecommitdiffstats
path: root/test/Transforms/DeadStoreElimination/simple.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/DeadStoreElimination/simple.ll')
-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 a61eac9..23576dad 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
+}
+
OpenPOWER on IntegriCloud