[llvm] r232774 - WinEH: Make llvm.eh.actions emission match the EH docs
Reid Kleckner
reid at kleckner.net
Thu Mar 19 15:31:03 PDT 2015
Author: rnk
Date: Thu Mar 19 17:31:02 2015
New Revision: 232774
URL: http://llvm.org/viewvc/llvm-project?rev=232774&view=rev
Log:
WinEH: Make llvm.eh.actions emission match the EH docs
This switches the sense of the i32 values and updates the test cases.
We can also use CHECK-SAME to clean up some tests, and reduce the visual
noise from bitcasts.
Modified:
llvm/trunk/lib/CodeGen/WinEHPrepare.cpp
llvm/trunk/test/CodeGen/WinEH/cppeh-catch-all.ll
llvm/trunk/test/CodeGen/WinEH/cppeh-catch-scalar.ll
llvm/trunk/test/CodeGen/WinEH/cppeh-frame-vars.ll
llvm/trunk/test/CodeGen/WinEH/cppeh-inalloca.ll
llvm/trunk/test/CodeGen/WinEH/cppeh-min-unwind.ll
llvm/trunk/test/CodeGen/WinEH/cppeh-nested-1.ll
llvm/trunk/test/CodeGen/WinEH/cppeh-nested-2.ll
llvm/trunk/test/CodeGen/WinEH/cppeh-nested-3.ll
llvm/trunk/test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll
llvm/trunk/test/CodeGen/WinEH/seh-simple.ll
Modified: llvm/trunk/lib/CodeGen/WinEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/WinEHPrepare.cpp?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/WinEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/WinEHPrepare.cpp Thu Mar 19 17:31:02 2015
@@ -401,8 +401,7 @@ bool WinEHPrepare::prepareExceptionHandl
// Look for evidence that this landingpad has already been processed.
bool LPadHasActionList = false;
BasicBlock *LPadBB = LPad->getParent();
- for (Instruction &Inst : LPadBB->getInstList()) {
- // FIXME: Make this an intrinsic.
+ for (Instruction &Inst : *LPadBB) {
if (auto *IntrinCall = dyn_cast<IntrinsicInst>(&Inst)) {
if (IntrinCall->getIntrinsicID() == Intrinsic::eh_actions) {
LPadHasActionList = true;
@@ -469,10 +468,10 @@ bool WinEHPrepare::prepareExceptionHandl
// Add a call to describe the actions for this landing pad.
std::vector<Value *> ActionArgs;
- ActionArgs.push_back(NewLPad);
for (ActionHandler *Action : Actions) {
+ // Action codes from docs are: 0 cleanup, 1 catch.
if (auto *CatchAction = dyn_cast<CatchHandler>(Action)) {
- ActionArgs.push_back(ConstantInt::get(Int32Type, 0));
+ ActionArgs.push_back(ConstantInt::get(Int32Type, 1));
ActionArgs.push_back(CatchAction->getSelector());
Value *EHObj = const_cast<Value *>(CatchAction->getExceptionVar());
if (EHObj)
@@ -480,11 +479,9 @@ bool WinEHPrepare::prepareExceptionHandl
else
ActionArgs.push_back(ConstantPointerNull::get(Int8PtrType));
} else {
- ActionArgs.push_back(ConstantInt::get(Int32Type, 1));
+ ActionArgs.push_back(ConstantInt::get(Int32Type, 0));
}
- Constant *HandlerPtr = ConstantExpr::getBitCast(
- Action->getHandlerBlockOrFunc(), Int8PtrType);
- ActionArgs.push_back(HandlerPtr);
+ ActionArgs.push_back(Action->getHandlerBlockOrFunc());
}
CallInst *Recover =
CallInst::Create(ActionIntrin, ActionArgs, "recover", NewLPadBB);
Modified: llvm/trunk/test/CodeGen/WinEH/cppeh-catch-all.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/cppeh-catch-all.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/cppeh-catch-all.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/cppeh-catch-all.ll Thu Mar 19 17:31:02 2015
@@ -36,9 +36,9 @@ invoke.cont:
br label %try.cont
; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry
-; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK-NEXT: catch i8* null
-; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 0, i8* null, i8* null, i8* bitcast (i8* (i8*, i8*)* @_Z4testv.catch to i8*))
+; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions(i32 1, i8* null, i8* null, i8* (i8*, i8*)* @_Z4testv.catch)
; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont]
lpad: ; preds = %entry
Modified: llvm/trunk/test/CodeGen/WinEH/cppeh-catch-scalar.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/cppeh-catch-scalar.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/cppeh-catch-scalar.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/cppeh-catch-scalar.ll Thu Mar 19 17:31:02 2015
@@ -41,9 +41,9 @@ invoke.cont:
br label %try.cont
; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry
-; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
-; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 0, i8* bitcast (i8** @_ZTIi to i8*), i32* %i, i8* bitcast (i8* (i8*, i8*)* @_Z4testv.catch to i8*))
+; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions(i32 1, i8* bitcast (i8** @_ZTIi to i8*), i32* %i, i8* (i8*, i8*)* @_Z4testv.catch)
; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont]
lpad: ; preds = %entry
Modified: llvm/trunk/test/CodeGen/WinEH/cppeh-frame-vars.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/cppeh-frame-vars.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/cppeh-frame-vars.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/cppeh-frame-vars.ll Thu Mar 19 17:31:02 2015
@@ -99,9 +99,9 @@ invoke.cont:
br label %try.cont
; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %for.body
-; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK-NEXT: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*)
-; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %e, i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch" to i8*))
+; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %e, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch")
; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont]
lpad: ; preds = %for.body
Modified: llvm/trunk/test/CodeGen/WinEH/cppeh-inalloca.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/cppeh-inalloca.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/cppeh-inalloca.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/cppeh-inalloca.ll Thu Mar 19 17:31:02 2015
@@ -62,10 +62,10 @@ invoke.cont:
br label %try.cont
; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry
-; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK-NEXT: cleanup
; CHECK-NEXT: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*)
-; CHECK-NEXT: [[RECOVER:\%recover.*]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %e, i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAHUA@@@Z.catch" to i8*), i32 1, i8* bitcast (void (i8*, i8*)* @"\01?test@@YAHUA@@@Z.cleanup" to i8*))
+; CHECK-NEXT: [[RECOVER:\%recover.*]] = call i8* (...)* @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %e, i8* (i8*, i8*)* @"\01?test@@YAHUA@@@Z.catch", i32 0, void (i8*, i8*)* @"\01?test@@YAHUA@@@Z.cleanup")
; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %cleanup]
lpad: ; preds = %entry
Modified: llvm/trunk/test/CodeGen/WinEH/cppeh-min-unwind.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/cppeh-min-unwind.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/cppeh-min-unwind.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/cppeh-min-unwind.ll Thu Mar 19 17:31:02 2015
@@ -44,9 +44,9 @@ invoke.cont:
ret void
; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry
-; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK-NEXT: cleanup
-; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 1, i8* bitcast (void (i8*, i8*)* @_Z4testv.cleanup to i8*))
+; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions(i32 0, void (i8*, i8*)* @_Z4testv.cleanup)
; CHECK-NEXT: indirectbr i8* [[RECOVER]], []
lpad: ; preds = %entry
Modified: llvm/trunk/test/CodeGen/WinEH/cppeh-nested-1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/cppeh-nested-1.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/cppeh-nested-1.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/cppeh-nested-1.ll Thu Mar 19 17:31:02 2015
@@ -53,10 +53,10 @@ invoke.cont:
br label %try.cont
; CHECK: [[LPAD_LABEL]]:
-; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*)
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*)
-; CHECK: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %i, i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch" to i8*), i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* %f, i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1" to i8*))
+; CHECK: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions(i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %i, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch" to i8*), i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* %f, i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1")
; CHECK: indirectbr i8* [[RECOVER]], [label %try.cont, label %try.cont10]
lpad: ; preds = %entry
@@ -153,7 +153,7 @@ eh.resume:
; CHECK: [[LPAD1_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*)
; ------------================= FAIL here =================------------
-; CHECK: [[RECOVER1:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD1_VAL]], i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* [[F_PTR]], i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1" to i8*))
+; CHECK: [[RECOVER1:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD1_VAL]], i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* [[F_PTR]], i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1")
; CHECK: indirectbr i8* [[RECOVER1]], []
;
; CHECK: }
Modified: llvm/trunk/test/CodeGen/WinEH/cppeh-nested-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/cppeh-nested-2.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/cppeh-nested-2.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/cppeh-nested-2.ll Thu Mar 19 17:31:02 2015
@@ -91,9 +91,9 @@ invoke.cont5:
br label %try.cont
; CHECK: [[LPAD_LABEL]]:
-; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIf to i8*)
-; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 0, i8* bitcast (i8** @_ZTIf to i8*), float* %f, i8* bitcast (i8* (i8*, i8*)* @_Z4testv.catch to i8*))
+; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions(i32 1, i8* bitcast (i8** @_ZTIf to i8*), float* %f, i8* (i8*, i8*)* @_Z4testv.catch)
; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont19]
lpad: ; preds = %try.cont, %entry
@@ -106,11 +106,14 @@ lpad:
br label %catch.dispatch11
; CHECK: [[LPAD1_LABEL]]:
-; CHECK: [[LPAD1_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK-NEXT: cleanup
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIf to i8*)
-; CHECK-NEXT: [[RECOVER1:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD1_VAL]], i32 0, i8* bitcast (i8** @_ZTIi to i8*), i32* %i, i8* bitcast (i8* (i8*, i8*)* @_Z4testv.catch1 to i8*), i32 1, i8* bitcast (void (i8*, i8*)* @_Z4testv.cleanup to i8*), i32 0, i8* bitcast (i8** @_ZTIf to i8*), float* %f, i8* bitcast (i8* (i8*, i8*)* @_Z4testv.catch to i8*))
+; CHECK-NEXT: [[RECOVER1:\%.+]] = call i8* (...)* @llvm.eh.actions(
+; CHECK-SAME: i32 1, i8* bitcast (i8** @_ZTIi to i8*), i32* %i, i8* (i8*, i8*)* @_Z4testv.catch1,
+; CHECK-SAME: i32 0, void (i8*, i8*)* @_Z4testv.cleanup,
+; CHECK-SAME: i32 1, i8* bitcast (i8** @_ZTIf to i8*), float* %f, i8* (i8*, i8*)* @_Z4testv.catch)
; CHECK-NEXT: indirectbr i8* [[RECOVER1]], [label %try.cont, label %try.cont19]
lpad1: ; preds = %invoke.cont4, %invoke.cont
@@ -125,11 +128,15 @@ lpad1:
br label %catch.dispatch
; CHECK: [[LPAD3_LABEL]]:
-; CHECK: [[LPAD3_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK-NEXT: cleanup
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIf to i8*)
-; CHECK-NEXT: [[RECOVER3:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD3_VAL]], i32 1, i8* bitcast (void (i8*, i8*)* @_Z4testv.cleanup2 to i8*), i32 0, i8* bitcast (i8** @_ZTIi to i8*), i32* %i, i8* bitcast (i8* (i8*, i8*)* @_Z4testv.catch1 to i8*), i32 1, i8* bitcast (void (i8*, i8*)* @_Z4testv.cleanup to i8*), i32 0, i8* bitcast (i8** @_ZTIf to i8*), float* %f, i8* bitcast (i8* (i8*, i8*)* @_Z4testv.catch to i8*))
+; CHECK-NEXT: [[RECOVER3:\%.+]] = call i8* (...)* @llvm.eh.actions(
+; CHECK-SAME: i32 0, void (i8*, i8*)* @_Z4testv.cleanup2,
+; CHECK-SAME: i32 1, i8* bitcast (i8** @_ZTIi to i8*), i32* %i, i8* (i8*, i8*)* @_Z4testv.catch1,
+; CHECK-SAME: i32 0, void (i8*, i8*)* @_Z4testv.cleanup,
+; CHECK-SAME: i32 1, i8* bitcast (i8** @_ZTIf to i8*), float* %f, i8* (i8*, i8*)* @_Z4testv.catch)
; CHECK-NEXT: indirectbr i8* [[RECOVER3]], [label %try.cont, label %try.cont19]
lpad3: ; preds = %invoke.cont2
Modified: llvm/trunk/test/CodeGen/WinEH/cppeh-nested-3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/cppeh-nested-3.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/cppeh-nested-3.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/cppeh-nested-3.ll Thu Mar 19 17:31:02 2015
@@ -63,10 +63,10 @@ invoke.cont:
br label %try.cont10
; CHECK: [[LPAD_LABEL]]:
-; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*)
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*)
-; CHECK: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %i, i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch" to i8*), i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* %f, i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1" to i8*))
+; CHECK: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions(i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %i, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch" to i8*), i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* %f, i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1")
; CHECK: indirectbr i8* [[RECOVER]], [label %try.cont10, label %try.cont19]
lpad: ; preds = %entry
@@ -205,7 +205,7 @@ eh.resume:
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*)
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*)
; ------------================= FAIL here =================------------
-; CHECK: [[RECOVER1:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD1_VAL]], i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* [[J_PTR]], i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch2" to i8*), i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* [[F_PTR1]], i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1" to i8*))
+; CHECK: [[RECOVER1:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD1_VAL]], i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* [[J_PTR]], i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch2" to i8*), i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* [[F_PTR1]], i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1")
; CHECK: indirectbr i8* [[RECOVER1]], []
;
; CHECK: invoke.cont9:
@@ -215,7 +215,7 @@ eh.resume:
; CHECK: [[LPAD8_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*)
; ------------================= FAIL here =================------------
-; CHECK: [[RECOVER2:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD8_VAL]], i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* [[F_PTR1]], i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1" to i8*))
+; CHECK: [[RECOVER2:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD8_VAL]], i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M at 8" to i8*), float* [[F_PTR1]], i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch1")
; CHECK: indirectbr i8* [[RECOVER2]], []
;
; CHECK: }
Modified: llvm/trunk/test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll Thu Mar 19 17:31:02 2015
@@ -112,9 +112,9 @@ invoke.cont:
br label %try.cont
; CHECK: [[LPAD_LABEL:lpad[0-9]*]]:{{[ ]+}}; preds = %for.body
-; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
; CHECK-NEXT: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*)
-; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %e, i8* bitcast (i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch" to i8*))
+; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*), i32* %e, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch")
; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont]
lpad: ; preds = %for.body
Modified: llvm/trunk/test/CodeGen/WinEH/seh-simple.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WinEH/seh-simple.ll?rev=232774&r1=232773&r2=232774&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WinEH/seh-simple.ll (original)
+++ llvm/trunk/test/CodeGen/WinEH/seh-simple.ll Thu Mar 19 17:31:02 2015
@@ -39,7 +39,7 @@ eh.resume:
; CHECK-LABEL: define i32 @simple_except_store()
; CHECK: landingpad { i8*, i32 }
; CHECK-NEXT: catch i32 ()* @filt
-; CHECK-NEXT: call i8* (...)* @llvm.eh.actions({{.*}}, i32 0, i8* bitcast (i32 ()* @filt to i8*), i8* null, i8* blockaddress(@simple_except_store, %__except))
+; CHECK-NEXT: call i8* (...)* @llvm.eh.actions(i32 1, i8* bitcast (i32 ()* @filt to i8*), i8* null, i8* blockaddress(@simple_except_store, %__except))
; CHECK-NEXT: indirectbr {{.*}} [label %__except]
define i32 @catch_all() {
@@ -63,7 +63,7 @@ return:
; CHECK-LABEL: define i32 @catch_all()
; CHECK: landingpad { i8*, i32 }
; CHECK-NEXT: catch i8* null
-; CHECK-NEXT: call i8* (...)* @llvm.eh.actions({{.*}}, i32 0, i8* null, i8* null, i8* blockaddress(@catch_all, %catch.all))
+; CHECK-NEXT: call i8* (...)* @llvm.eh.actions(i32 1, i8* null, i8* null, i8* blockaddress(@catch_all, %catch.all))
; CHECK-NEXT: indirectbr {{.*}} [label %catch.all]
;
; CHECK: catch.all:
@@ -94,7 +94,7 @@ eh.resume:
; CHECK-LABEL: define i32 @except_phi()
; CHECK: landingpad { i8*, i32 }
; CHECK-NEXT: catch i32 ()* @filt
-; CHECK-NEXT: call i8* (...)* @llvm.eh.actions({{.*}}, i32 0, i8* bitcast (i32 ()* @filt to i8*), i8* null, i8* blockaddress(@except_phi, %return))
+; CHECK-NEXT: call i8* (...)* @llvm.eh.actions(i32 1, i8* bitcast (i32 ()* @filt to i8*), i8* null, i8* blockaddress(@except_phi, %return))
; CHECK-NEXT: indirectbr {{.*}} [label %return]
;
; CHECK: return:
@@ -129,8 +129,8 @@ eh.resume:
; CHECK-NEXT: cleanup
; CHECK-NEXT: catch i32 ()* @filt
; CHECK-NEXT: call i8* (...)* @llvm.eh.actions(
-; CHECK: i32 1, i8* bitcast (void (i8*, i8*)* @cleanup_and_except.cleanup to i8*),
-; CHECK: i32 0, i8* bitcast (i32 ()* @filt to i8*), i8* null, i8* blockaddress(@cleanup_and_except, %return))
+; CHECK: i32 0, void (i8*, i8*)* @cleanup_and_except.cleanup,
+; CHECK: i32 1, i8* bitcast (i32 ()* @filt to i8*), i8* null, i8* blockaddress(@cleanup_and_except, %return))
; CHECK-NEXT: indirectbr {{.*}} [label %return]
;
; CHECK: return:
More information about the llvm-commits
mailing list