summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-11-08 00:09:27 +0000
committerBill Wendling <isanbard@gmail.com>2011-11-08 00:09:27 +0000
commit30ceba32b28b84dd1f1003dff58cd87effe5a354 (patch)
tree91e571c30a8598e7d8efba1082f4e160d847e032 /test
parent0eff39f2e25e9d8dd52b1eb7fa4e7cc6cc77875f (diff)
downloadllvm-30ceba32b28b84dd1f1003dff58cd87effe5a354.tar.gz
llvm-30ceba32b28b84dd1f1003dff58cd87effe5a354.tar.bz2
llvm-30ceba32b28b84dd1f1003dff58cd87effe5a354.tar.xz
Convert tests to the new EH model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/ARM/2009-08-31-LSDA-Name.ll11
-rw-r--r--test/CodeGen/ARM/2010-07-26-GlobalMerge.ll11
-rw-r--r--test/CodeGen/ARM/2010-08-04-EHCrash.ll12
-rw-r--r--test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll25
-rw-r--r--test/CodeGen/ARM/eh-resume-darwin.ll13
-rw-r--r--test/CodeGen/X86/no-cfi.ll8
6 files changed, 29 insertions, 51 deletions
diff --git a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll b/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
index 8bde7489d9..a016809857 100644
--- a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
+++ b/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
@@ -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(...)
diff --git a/test/CodeGen/ARM/2010-07-26-GlobalMerge.ll b/test/CodeGen/ARM/2010-07-26-GlobalMerge.ll
index c03c815459..2842437e7e 100644
--- a/test/CodeGen/ARM/2010-07-26-GlobalMerge.ll
+++ b/test/CodeGen/ARM/2010-07-26-GlobalMerge.ll
@@ -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
diff --git a/test/CodeGen/ARM/2010-08-04-EHCrash.ll b/test/CodeGen/ARM/2010-08-04-EHCrash.ll
index f57b7e6769..4b47085afd 100644
--- a/test/CodeGen/ARM/2010-08-04-EHCrash.ll
+++ b/test/CodeGen/ARM/2010-08-04-EHCrash.ll
@@ -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()
diff --git a/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll b/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
index 0b5f96251d..d3394b58ed 100644
--- a/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
+++ b/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
@@ -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()
diff --git a/test/CodeGen/ARM/eh-resume-darwin.ll b/test/CodeGen/ARM/eh-resume-darwin.ll
index e4755085de..d1252f4c98 100644
--- a/test/CodeGen/ARM/eh-resume-darwin.ll
+++ b/test/CodeGen/ARM/eh-resume-darwin.ll
@@ -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
diff --git a/test/CodeGen/X86/no-cfi.ll b/test/CodeGen/X86/no-cfi.ll
index f9985d4585..5bb9bb2d4f 100644
--- a/test/CodeGen/X86/no-cfi.ll
+++ b/test/CodeGen/X86/no-cfi.ll
@@ -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