llvm.org GIT mirror llvm / 30ceba3
Convert tests to the new EH model. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144048 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 8 years ago
6 changed file(s) with 29 addition(s) and 51 deletion(s). Raw diff Collapse all Expand all
3636 ret void
3737
3838 lpad: ; preds = %entry
39 %eh_ptr = call i8* @llvm.eh.exception()
39 %exn = landingpad {i8*, i32} personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
40 cleanup
41 %eh_ptr = extractvalue {i8*, i32} %exn, 0
4042 store i8* %eh_ptr, i8** %eh_exception
41 %eh_ptr1 = load i8** %eh_exception
42 %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0)
43 %eh_select2 = extractvalue {i8*, i32} %exn, 1
4344 store i32 %eh_select2, i32* %eh_selector
4445 br label %ppad
4546
9394
9495 declare void @_Z3barv()
9596
96 declare i8* @llvm.eh.exception() nounwind readonly
97
98 declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
99
10097 declare i32 @llvm.eh.typeid.for(i8*) nounwind
10198
10299 declare i32 @__gxx_personality_sj0(...)
2020
2121 declare i8* @__cxa_allocate_exception(i32)
2222
23 declare i8* @llvm.eh.exception() nounwind readonly
24
2523 declare i32 @__gxx_personality_sj0(...)
26
27 declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
2824
2925 declare i32 @llvm.eh.typeid.for(i8*) nounwind
3026
7470 ret i32 %conv
7571
7672 lpad: ; preds = %entry
77 %exn = tail call i8* @llvm.eh.exception() nounwind ; [#uses=4]
78 %eh.selector = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* bitcast (%0* @_ZTI1A to i8*), i8* null) nounwind ; [#uses=1]
73 %exn.ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
74 catch i8* bitcast (%0* @_ZTI1A to i8*)
75 catch i8* null
76 %exn = extractvalue { i8*, i32 } %exn.ptr, 0
77 %eh.selector = extractvalue { i8*, i32 } %exn.ptr, 1
7978 %2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (%0* @_ZTI1A to i8*)) nounwind ; [#uses=1]
8079 %3 = icmp eq i32 %eh.selector, %2 ; [#uses=1]
8180 br i1 %3, label %try.cont, label %eh.resume
3333 ret void
3434
3535 lpad: ; preds = %bb
36 %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=1]
37 store i8* %eh_ptr, i8** %eh_exception
36 %eh_ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
37 cleanup
38 %exn = extractvalue { i8*, i32 } %eh_ptr, 0
39 store i8* %exn, i8** %eh_exception
3840 %eh_ptr13 = load i8** %eh_exception ; [#uses=1]
39 %eh_select14 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 1)
41 %eh_select14 = extractvalue { i8*, i32 } %eh_ptr, 1
4042 store i32 %eh_select14, i32* %eh_selector
4143 br label %ppad
4244
5355
5456 declare arm_apcscc void @_ZSt9terminatev() noreturn nounwind
5557
56 declare i8* @llvm.eh.exception() nounwind readonly
57
58 declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
59
6058 declare arm_apcscc void @_Unwind_SjLj_Resume(i8*)
6159
6260 declare arm_apcscc void @func3()
3434 br label %for.cond
3535
3636 lpad:
37 %exn = tail call i8* @llvm.eh.exception() nounwind
38 %eh.selector = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
37 %exn = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
38 catch i8* null
3939 invoke void @foo()
4040 to label %eh.resume unwind label %terminate.lpad
4141
4242 lpad26:
43 %exn27 = tail call i8* @llvm.eh.exception() nounwind
44 %eh.selector28 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn27, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
43 %exn27 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
44 catch i8* null
4545 invoke void @foo()
4646 to label %eh.resume unwind label %terminate.lpad
4747
5656 ret void
5757
5858 lpad44:
59 %exn45 = tail call i8* @llvm.eh.exception() nounwind
60 %eh.selector46 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn45, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
59 %exn45 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
60 catch i8* null
6161 invoke void @foo()
6262 to label %eh.resume unwind label %terminate.lpad
6363
6464 eh.resume:
65 %exn.slot.0 = phi i8* [ %exn27, %lpad26 ], [ %exn, %lpad ], [ %exn45, %lpad44 ]
66 tail call void @_Unwind_SjLj_Resume_or_Rethrow(i8* %exn.slot.0) noreturn
67 unreachable
65 %exn.slot.0 = phi { i8*, i32 } [ %exn27, %lpad26 ], [ %exn, %lpad ], [ %exn45, %lpad44 ]
66 resume { i8*, i32 } %exn.slot.0
6867
6968 terminate.lpad:
70 %exn51 = tail call i8* @llvm.eh.exception() nounwind
71 %eh.selector52 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn51, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
69 %exn51 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
70 catch i8* null
7271 tail call void @_ZSt9terminatev() noreturn nounwind
7372 unreachable
7473 }
7574
7675 declare void @foo()
7776
78 declare i8* @llvm.eh.exception() nounwind readonly
79
8077 declare i32 @__gxx_personality_sj0(...)
81
82 declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
8378
8479 declare void @_Unwind_SjLj_Resume_or_Rethrow(i8*)
8580
11 target triple = "armv6-apple-macosx10.6"
22
33 declare void @func()
4
5 declare i8* @llvm.eh.exception() nounwind readonly
6
7 declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
8
9 declare void @llvm.eh.resume(i8*, i32)
104
115 declare i32 @__gxx_personality_sj0(...)
126
1913 ret void
2014
2115 lpad:
22 %exn = call i8* @llvm.eh.exception()
23 %sel = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0)
24 call void @llvm.eh.resume(i8* %exn, i32 %sel) noreturn
25 unreachable
16 %exn = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
17 cleanup
18 resume { i8*, i32 } %exn
2619 }
2720
2821 ; CHECK: __Unwind_SjLj_Resume
2323 ret void
2424
2525 lpad:
26 %exn = call i8* @llvm.eh.exception() nounwind
27 %eh.selector = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) nounwind
26 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
27 catch i8* null
2828 ret void
2929 }
3030
3131 declare i32 @foo()
3232
33 declare i8* @llvm.eh.exception() nounwind readonly
34
3533 declare i32 @__gxx_personality_v0(...)
36
37 declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind