add a test similar to that needed for PR4313, but that doesn't
authorChris Lattner <sabre@nondot.org>
Tue, 20 Oct 2009 21:00:47 +0000 (21:00 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 20 Oct 2009 21:00:47 +0000 (21:00 +0000)
fail without the patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84675 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/SCCP/ipsccp-basic.ll

index 29d052a25bb338a8981e8444c95d7ca3eb2f78e5..6141972c25b59609469dbf5c820c112819d13e77 100644 (file)
@@ -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