llvm.org GIT mirror llvm / 82a39b3
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 Chris Lattner 10 years ago
1 changed file(s) with 30 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
7171 ; CHECK: define i32 @test3b
7272 ; CHECK-NOT: store
7373 ; CHECK: ret i32 0
74
75
76 ;;======================== test4
77
78 define internal {i64,i64} @test4a() {
79 %a = insertvalue {i64,i64} undef, i64 4, 1
80 %b = insertvalue {i64,i64} %a, i64 5, 0
81 ret {i64,i64} %b
82 }
83
84 define i64 @test4b() {
85 %a = invoke {i64,i64} @test4a()
86 to label %A unwind label %B
87 A:
88 %b = extractvalue {i64,i64} %a, 0
89 %c = call i64 @test4c(i64 %b)
90 ret i64 %c
91 B:
92 ret i64 0
93 }
94 ; CHECK: define i64 @test4b()
95 ; CHECK: %c = call i64 @test4c(i64 5)
96 ; CHECK-NEXT: ret i64 5
97
98
99 define internal i64 @test4c(i64 %a) {
100 ret i64 %a
101 }
102 ; CHECK: define internal i64 @test4c
103 ; CHECK: ret i64 undef