From 0737ccf04804d94561c1037fa7da7a257dbe2a3f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 20 Oct 2009 21:00:47 +0000 Subject: [PATCH] add a test similar to that needed for PR4313, but that doesn't fail without the patch. llvm-svn: 84675 --- test/Transforms/SCCP/ipsccp-basic.ll | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/Transforms/SCCP/ipsccp-basic.ll b/test/Transforms/SCCP/ipsccp-basic.ll index 29d052a25bb..6141972c25b 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