aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-20 21:00:47 +0000
committerChris Lattner <sabre@nondot.org>2009-10-20 21:00:47 +0000
commit82a39b3e14a20bc0ae00917b9ad785b93769df9e (patch)
tree259f4e91de32e89c12a777f9fc4e1031d4bbd5c0
parentb5b1e7738b2fdba8aff86f8163821cf9faf527d6 (diff)
add a test similar to that needed for PR4313, but that doesn't
fail without the patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84675 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/SCCP/ipsccp-basic.ll30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Transforms/SCCP/ipsccp-basic.ll b/test/Transforms/SCCP/ipsccp-basic.ll
index 29d052a25b..6141972c25 100644
--- a/test/Transforms/SCCP/ipsccp-basic.ll
+++ b/test/Transforms/SCCP/ipsccp-basic.ll
@@ -72,3 +72,33 @@ F:
; CHECK: define i32 @test3b
; CHECK-NOT: store
; CHECK: ret i32 0
+
+
+;;======================== test4
+
+define internal {i64,i64} @test4a() {
+ %a = insertvalue {i64,i64} undef, i64 4, 1
+ %b = insertvalue {i64,i64} %a, i64 5, 0
+ ret {i64,i64} %b
+}
+
+define i64 @test4b() {
+ %a = invoke {i64,i64} @test4a()
+ to label %A unwind label %B
+A:
+ %b = extractvalue {i64,i64} %a, 0
+ %c = call i64 @test4c(i64 %b)
+ ret i64 %c
+B:
+ ret i64 0
+}
+; CHECK: define i64 @test4b()
+; CHECK: %c = call i64 @test4c(i64 5)
+; CHECK-NEXT: ret i64 5
+
+
+define internal i64 @test4c(i64 %a) {
+ ret i64 %a
+}
+; CHECK: define internal i64 @test4c
+; CHECK: ret i64 undef