llvm.org GIT mirror llvm / aeaa9a8
Update some tests to the new EH scheme. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138925 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 8 years ago
5 changed file(s) with 27 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1010 %y = extractvalue {i32,i32} %x, 1
1111 ret i32 %y
1212 T2:
13 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
14 cleanup
1315 unreachable
1416 }
1517
2123 %y = extractvalue {i32,i32} %x, 1
2224 ret i32 %y
2325 T2:
26 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
27 cleanup
2428 unreachable
2529 }
30
31 declare i32 @__gxx_personality_v0(...)
4545 ret0:
4646 ret i1 0
4747 ret1:
48 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
49 cleanup
4850 ret i1 1
4951 }
52
53 declare i32 @__gxx_personality_v0(...)
5054
5155 define i1* @lookup_bit(i32* %q, i32 %bitno) readnone nounwind {
5256 %tmp = ptrtoint i32* %q to i32
4444 ret i32 0
4545
4646 landing_pad: ; preds = %l147.i.i, %l129.i.i, %l117.i.i
47 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
48 cleanup
4749 switch i32 undef, label %fin [
4850 i32 1, label %catch1
4951 i32 2, label %catch
6062 }
6163
6264 declare fastcc void @foo()
65
66 declare i32 @__gxx_personality_v0(...)
3535 ;; propagated per-caller).
3636 %S1 = call { i32, i32 } @foo(i32 1, i32 2)
3737 %X1 = extractvalue { i32, i32 } %S1, 0
38 %S2 = invoke { i32, i32 } @foo(i32 3, i32 4) to label %OK unwind label %RET
38 %S2 = invoke { i32, i32 } @foo(i32 3, i32 4) to label %OK unwind label %LPAD
39
3940 OK:
4041 %X2 = extractvalue { i32, i32 } %S2, 0
4142 ;; Do some stuff with the returned values which we can grep for
4243 %Z = add i32 %X1, %X2
4344 store i32 %Z, i32* %W
4445 br label %RET
46
47 LPAD:
48 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
49 cleanup
50 br label %RET
51
4552 RET:
4653 ret void
4754 }
4855
56 declare i32 @__gxx_personality_v0(...)
2121 %Y = icmp ne i32 %X, 0 ; [#uses=1]
2222 ret i1 %Y
2323 FAIL:
24 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
25 cleanup
2426 ret i1 false
2527 }
28
29 declare i32 @__gxx_personality_v0(...)