[IR] Give catchret an optional 'return value' operand
Some personality routines require funclet exit points to be clearly
marked, this is done by producing a token at the funclet pad and
consuming it at the corresponding ret instruction. CleanupReturnInst
already had a spot for this operand but CatchReturnInst did not.
Other personality routines don't need to use this which is why it has
been made optional.
llvm-svn: 245149
diff --git a/llvm/test/CodeGen/WinEH/wineh-demotion.ll b/llvm/test/CodeGen/WinEH/wineh-demotion.ll
index eb342bc..9f49e13 100644
--- a/llvm/test/CodeGen/WinEH/wineh-demotion.ll
+++ b/llvm/test/CodeGen/WinEH/wineh-demotion.ll
@@ -43,7 +43,7 @@
; CHECK: [[Reload:%[^ ]+]] = load i32, i32* [[Slot]]
; CHECK-NEXT: call void @h(i32 [[Reload]])
call void @h(i32 %phi)
- catchret label %exit
+ catchret void to label %exit
catchend:
catchendpad unwind to caller
@@ -89,7 +89,7 @@
to label %catchret.inner unwind label %merge.outer
catchret.inner:
- catchret label %exit
+ catchret void to label %exit
catchend.inner:
catchendpad unwind label %merge.outer
@@ -109,10 +109,10 @@
; CHECK: catch.outer:
; CHECK-DAG: load i32, i32* [[Slot1]]
; CHECK-DAG: load i32, i32* [[Slot2]]
- ; CHECK: catchret label
+ ; CHECK: catchret void to label
call void @h(i32 %x)
call void @h(i32 %y)
- catchret label %exit
+ catchret void to label %exit
exit:
ret void
@@ -152,7 +152,7 @@
; CHECK: %phi = phi i32 [ [[ReloadX]], %left ]
%phi = phi i32 [ %x, %left ], [ 42, %right ]
call void @h(i32 %phi)
- catchret label %exit
+ catchret void to label %exit
catchend:
catchendpad unwind to caller
@@ -192,7 +192,7 @@
%phi.inner = phi i32 [ %l, %left ], [ %r, %right ]
catchpad void [] to label %catch.inner unwind label %catchend.inner
catch.inner:
- catchret label %join
+ catchret void to label %join
catchend.inner:
catchendpad unwind label %catchpad.outer
join:
@@ -213,7 +213,7 @@
; CHECK: [[Reload:%[^ ]+]] = load i32, i32* [[Slot]]
; CHECK: call void @h(i32 [[Reload]])
call void @h(i32 %phi.outer)
- catchret label %exit
+ catchret void to label %exit
catchend.outer:
catchendpad unwind to caller
exit:
@@ -286,7 +286,7 @@
; CHECK: [[CatchReload:%[^ ]+]] = load i32, i32* [[CatchSlot]]
; CHECK: call void @h(i32 [[CatchReload]]
call void @h(i32 %phi.catch)
- catchret label %exit
+ catchret void to label %exit
catchend:
catchendpad unwind to caller