mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Convert tests to the new EH model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144048 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0eff39f2e2
commit
30ceba32b2
@ -37,10 +37,11 @@ return: ; preds = %invcont
|
||||
ret void
|
||||
|
||||
lpad: ; preds = %entry
|
||||
%eh_ptr = call i8* @llvm.eh.exception()
|
||||
%exn = landingpad {i8*, i32} personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
cleanup
|
||||
%eh_ptr = extractvalue {i8*, i32} %exn, 0
|
||||
store i8* %eh_ptr, i8** %eh_exception
|
||||
%eh_ptr1 = load i8** %eh_exception
|
||||
%eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0)
|
||||
%eh_select2 = extractvalue {i8*, i32} %exn, 1
|
||||
store i32 %eh_select2, i32* %eh_selector
|
||||
br label %ppad
|
||||
|
||||
@ -94,10 +95,6 @@ declare void @_ZdlPv(i8*) nounwind
|
||||
|
||||
declare void @_Z3barv()
|
||||
|
||||
declare i8* @llvm.eh.exception() nounwind readonly
|
||||
|
||||
declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
|
||||
|
||||
declare i32 @llvm.eh.typeid.for(i8*) nounwind
|
||||
|
||||
declare i32 @__gxx_personality_sj0(...)
|
||||
|
@ -21,12 +21,8 @@ declare i32 @printf(i8* nocapture, ...) nounwind
|
||||
|
||||
declare i8* @__cxa_allocate_exception(i32)
|
||||
|
||||
declare i8* @llvm.eh.exception() nounwind readonly
|
||||
|
||||
declare i32 @__gxx_personality_sj0(...)
|
||||
|
||||
declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
|
||||
|
||||
declare i32 @llvm.eh.typeid.for(i8*) nounwind
|
||||
|
||||
declare void @_Unwind_SjLj_Resume(i8*)
|
||||
@ -75,8 +71,11 @@ try.cont: ; preds = %lpad
|
||||
ret i32 %conv
|
||||
|
||||
lpad: ; preds = %entry
|
||||
%exn = tail call i8* @llvm.eh.exception() nounwind ; <i8*> [#uses=4]
|
||||
%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 ; <i32> [#uses=1]
|
||||
%exn.ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
catch i8* bitcast (%0* @_ZTI1A to i8*)
|
||||
catch i8* null
|
||||
%exn = extractvalue { i8*, i32 } %exn.ptr, 0
|
||||
%eh.selector = extractvalue { i8*, i32 } %exn.ptr, 1
|
||||
%2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (%0* @_ZTI1A to i8*)) nounwind ; <i32> [#uses=1]
|
||||
%3 = icmp eq i32 %eh.selector, %2 ; <i1> [#uses=1]
|
||||
br i1 %3, label %try.cont, label %eh.resume
|
||||
|
@ -34,10 +34,12 @@ return: ; preds = %entry
|
||||
ret void
|
||||
|
||||
lpad: ; preds = %bb
|
||||
%eh_ptr = call i8* @llvm.eh.exception() ; <i8*> [#uses=1]
|
||||
store i8* %eh_ptr, i8** %eh_exception
|
||||
%eh_ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
cleanup
|
||||
%exn = extractvalue { i8*, i32 } %eh_ptr, 0
|
||||
store i8* %exn, i8** %eh_exception
|
||||
%eh_ptr13 = load i8** %eh_exception ; <i8*> [#uses=1]
|
||||
%eh_select14 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 1)
|
||||
%eh_select14 = extractvalue { i8*, i32 } %eh_ptr, 1
|
||||
store i32 %eh_select14, i32* %eh_selector
|
||||
br label %ppad
|
||||
|
||||
@ -54,10 +56,6 @@ declare arm_apcscc void @func2()
|
||||
|
||||
declare arm_apcscc void @_ZSt9terminatev() noreturn nounwind
|
||||
|
||||
declare i8* @llvm.eh.exception() nounwind readonly
|
||||
|
||||
declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
|
||||
|
||||
declare arm_apcscc void @_Unwind_SjLj_Resume(i8*)
|
||||
|
||||
declare arm_apcscc void @func3()
|
||||
|
@ -35,14 +35,14 @@ for.cond.backedge:
|
||||
br label %for.cond
|
||||
|
||||
lpad:
|
||||
%exn = tail call i8* @llvm.eh.exception() nounwind
|
||||
%eh.selector = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
|
||||
%exn = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
catch i8* null
|
||||
invoke void @foo()
|
||||
to label %eh.resume unwind label %terminate.lpad
|
||||
|
||||
lpad26:
|
||||
%exn27 = tail call i8* @llvm.eh.exception() nounwind
|
||||
%eh.selector28 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn27, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
|
||||
%exn27 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
catch i8* null
|
||||
invoke void @foo()
|
||||
to label %eh.resume unwind label %terminate.lpad
|
||||
|
||||
@ -57,31 +57,26 @@ call8.i.i.i.noexc:
|
||||
ret void
|
||||
|
||||
lpad44:
|
||||
%exn45 = tail call i8* @llvm.eh.exception() nounwind
|
||||
%eh.selector46 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn45, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
|
||||
%exn45 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
catch i8* null
|
||||
invoke void @foo()
|
||||
to label %eh.resume unwind label %terminate.lpad
|
||||
|
||||
eh.resume:
|
||||
%exn.slot.0 = phi i8* [ %exn27, %lpad26 ], [ %exn, %lpad ], [ %exn45, %lpad44 ]
|
||||
tail call void @_Unwind_SjLj_Resume_or_Rethrow(i8* %exn.slot.0) noreturn
|
||||
unreachable
|
||||
%exn.slot.0 = phi { i8*, i32 } [ %exn27, %lpad26 ], [ %exn, %lpad ], [ %exn45, %lpad44 ]
|
||||
resume { i8*, i32 } %exn.slot.0
|
||||
|
||||
terminate.lpad:
|
||||
%exn51 = tail call i8* @llvm.eh.exception() nounwind
|
||||
%eh.selector52 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn51, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
|
||||
%exn51 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
catch i8* null
|
||||
tail call void @_ZSt9terminatev() noreturn nounwind
|
||||
unreachable
|
||||
}
|
||||
|
||||
declare void @foo()
|
||||
|
||||
declare i8* @llvm.eh.exception() nounwind readonly
|
||||
|
||||
declare i32 @__gxx_personality_sj0(...)
|
||||
|
||||
declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
|
||||
|
||||
declare void @_Unwind_SjLj_Resume_or_Rethrow(i8*)
|
||||
|
||||
declare void @_ZSt9terminatev()
|
||||
|
@ -3,12 +3,6 @@ target triple = "armv6-apple-macosx10.6"
|
||||
|
||||
declare void @func()
|
||||
|
||||
declare i8* @llvm.eh.exception() nounwind readonly
|
||||
|
||||
declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
|
||||
|
||||
declare void @llvm.eh.resume(i8*, i32)
|
||||
|
||||
declare i32 @__gxx_personality_sj0(...)
|
||||
|
||||
define void @test0() {
|
||||
@ -20,10 +14,9 @@ cont:
|
||||
ret void
|
||||
|
||||
lpad:
|
||||
%exn = call i8* @llvm.eh.exception()
|
||||
%sel = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0)
|
||||
call void @llvm.eh.resume(i8* %exn, i32 %sel) noreturn
|
||||
unreachable
|
||||
%exn = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
cleanup
|
||||
resume { i8*, i32 } %exn
|
||||
}
|
||||
|
||||
; CHECK: __Unwind_SjLj_Resume
|
||||
|
@ -24,15 +24,11 @@ invoke.cont:
|
||||
ret void
|
||||
|
||||
lpad:
|
||||
%exn = call i8* @llvm.eh.exception() nounwind
|
||||
%eh.selector = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) nounwind
|
||||
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
||||
catch i8* null
|
||||
ret void
|
||||
}
|
||||
|
||||
declare i32 @foo()
|
||||
|
||||
declare i8* @llvm.eh.exception() nounwind readonly
|
||||
|
||||
declare i32 @__gxx_personality_v0(...)
|
||||
|
||||
declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
|
||||
|
Loading…
Reference in New Issue
Block a user