llvm.org GIT mirror llvm / d0d3cbb
add a real testcase for PR4313 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84676 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
1 changed file(s) with 32 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
101101 }
102102 ; CHECK: define internal i64 @test4c
103103 ; CHECK: ret i64 undef
104
105
106
107 ;;======================== test5
108
109 ; PR4313
110 define internal {i64,i64} @test5a() {
111 %a = insertvalue {i64,i64} undef, i64 4, 1
112 %b = insertvalue {i64,i64} %a, i64 5, 0
113 ret {i64,i64} %b
114 }
115
116 define i64 @test5b() {
117 %a = invoke {i64,i64} @test5a()
118 to label %A unwind label %B
119 A:
120 %c = call i64 @test5c({i64,i64} %a)
121 ret i64 %c
122 B:
123 ret i64 0
124 }
125
126 ; CHECK: define i64 @test5b()
127 ; CHECK: A:
128 ; CHECK-NEXT: %c = call i64 @test5c(%0 %a)
129 ; CHECK-NEXT: ret i64 %c
130
131 define internal i64 @test5c({i64,i64} %a) {
132 %b = extractvalue {i64,i64} %a, 0
133 ret i64 %b
134 }
135