add a real testcase for PR4313

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84676 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-10-20 21:04:26 +00:00
parent 82a39b3e14
commit d0d3cbb362

View File

@ -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
}