diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-20 21:04:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-20 21:04:26 +0000 |
commit | 7d7f7fb7fbcf64bc232fe800da0c1f4533485936 (patch) | |
tree | b0211edcc686be929f2a03633ed5e1bfa77743f3 | |
parent | f3eec137dfa3cb5dd54f6d15f9606a91d8f43f99 (diff) | |
download | external_llvm-7d7f7fb7fbcf64bc232fe800da0c1f4533485936.zip external_llvm-7d7f7fb7fbcf64bc232fe800da0c1f4533485936.tar.gz external_llvm-7d7f7fb7fbcf64bc232fe800da0c1f4533485936.tar.bz2 |
add a real testcase for PR4313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84676 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/SCCP/ipsccp-basic.ll | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/Transforms/SCCP/ipsccp-basic.ll b/test/Transforms/SCCP/ipsccp-basic.ll index 6141972..d3584d1 100644 --- a/test/Transforms/SCCP/ipsccp-basic.ll +++ b/test/Transforms/SCCP/ipsccp-basic.ll @@ -102,3 +102,35 @@ define internal i64 @test4c(i64 %a) { } ; CHECK: define internal i64 @test4c ; CHECK: ret i64 undef + + + +;;======================== test5 + +; PR4313 +define internal {i64,i64} @test5a() { + %a = insertvalue {i64,i64} undef, i64 4, 1 + %b = insertvalue {i64,i64} %a, i64 5, 0 + ret {i64,i64} %b +} + +define i64 @test5b() { + %a = invoke {i64,i64} @test5a() + to label %A unwind label %B +A: + %c = call i64 @test5c({i64,i64} %a) + ret i64 %c +B: + ret i64 0 +} + +; CHECK: define i64 @test5b() +; CHECK: A: +; CHECK-NEXT: %c = call i64 @test5c(%0 %a) +; CHECK-NEXT: ret i64 %c + +define internal i64 @test5c({i64,i64} %a) { + %b = extractvalue {i64,i64} %a, 0 + ret i64 %b +} + |