diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-20 21:00:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-20 21:00:47 +0000 |
commit | f3eec137dfa3cb5dd54f6d15f9606a91d8f43f99 (patch) | |
tree | 259f4e91de32e89c12a777f9fc4e1031d4bbd5c0 | |
parent | c10dc49d8abaad87a2b82cd9e56e989fd7e1d020 (diff) | |
download | external_llvm-f3eec137dfa3cb5dd54f6d15f9606a91d8f43f99.zip external_llvm-f3eec137dfa3cb5dd54f6d15f9606a91d8f43f99.tar.gz external_llvm-f3eec137dfa3cb5dd54f6d15f9606a91d8f43f99.tar.bz2 |
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.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Transforms/SCCP/ipsccp-basic.ll b/test/Transforms/SCCP/ipsccp-basic.ll index 29d052a..6141972 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 |