[llvm] 4a617c4 - [WinEH] Prepare test win64-funclet-preisel-intrinsics.ll for extension to nested try-catch case (NFC)
Stefan Gränitz via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 02:31:02 PDT 2022
Author: Stefan Gränitz
Date: 2022-09-29T11:30:27+02:00
New Revision: 4a617c426d80776afbf0cf375abfeded9399223f
URL: https://github.com/llvm/llvm-project/commit/4a617c426d80776afbf0cf375abfeded9399223f
DIFF: https://github.com/llvm/llvm-project/commit/4a617c426d80776afbf0cf375abfeded9399223f.diff
LOG: [WinEH] Prepare test win64-funclet-preisel-intrinsics.ll for extension to nested try-catch case (NFC)
Added:
Modified:
llvm/test/CodeGen/X86/win64-funclet-preisel-intrinsics.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/win64-funclet-preisel-intrinsics.ll b/llvm/test/CodeGen/X86/win64-funclet-preisel-intrinsics.ll
index 740e0da6ee0a8..c015a4e670d63 100644
--- a/llvm/test/CodeGen/X86/win64-funclet-preisel-intrinsics.ll
+++ b/llvm/test/CodeGen/X86/win64-funclet-preisel-intrinsics.ll
@@ -30,48 +30,49 @@ entry:
%ex2 = alloca ptr, align 8
invoke void @opaque() to label %invoke.cont unwind label %catch.dispatch
-catch.dispatch:
+catch.dispatch: ; preds = %entry
%0 = catchswitch within none [label %catch] unwind to caller
-invoke.cont:
+invoke.cont: ; preds = %entry
unreachable
-catch:
+catch: ; preds = %catch.dispatch
%1 = catchpad within %0 [ptr null, i32 64, ptr %exn.slot]
- call void @llvm.objc.storeStrong(ptr %ex2, ptr null) [ "funclet"(token %1) ]
+ %exn = load ptr, ptr %exn.slot, align 8
+ %2 = call ptr @llvm.objc.retain(ptr %exn) [ "funclet"(token %1) ]
+ store ptr %2, ptr %ex2, align 8
catchret from %1 to label %catchret.dest
-catchret.dest:
+catchret.dest: ; preds = %catch
ret void
}
declare void @opaque()
-declare void @llvm.objc.storeStrong(ptr, ptr) #0
+declare ptr @llvm.objc.retain(ptr) #0
declare i32 @__CxxFrameHandler3(...)
attributes #0 = { nounwind }
; EH catchpad with SEH prologue:
-; CHECK: # %catch
-; CHECK: pushq %rbp
-; CHECK: .seh_pushreg %rbp
-; ...
-; CHECK: .seh_endprologue
+; CHECK-LABEL: # %catch
+; CHECK: pushq %rbp
+; CHECK: .seh_pushreg %rbp
+; ...
+; CHECK: .seh_endprologue
;
; At this point the code used to be truncated (and sometimes terminated with an
; int3 opcode):
-; CHECK-NOT: int3
+; CHECK-NOT: int3
;
-; Instead, the call to objc_storeStrong should be emitted:
-; CHECK: leaq -24(%rbp), %rcx
-; CHECK: xorl %edx, %edx
-; CHECK: callq objc_storeStrong
-; ...
+; Instead, the runtime call to retain should be emitted:
+; CHECK: movq -8(%rbp), %rcx
+; CHECK: callq objc_retain
+; ...
;
; This is the end of the funclet:
-; CHECK: popq %rbp
-; CHECK: retq # CATCHRET
-; ...
-; CHECK: .seh_handlerdata
-; ...
-; CHECK: .seh_endproc
+; CHECK: popq %rbp
+; CHECK: retq # CATCHRET
+; ...
+; CHECK: .seh_handlerdata
+; ...
+; CHECK: .seh_endproc
More information about the llvm-commits
mailing list