Files
clang-p2996/llvm/test/CodeGen/WinEH/wineh-asm.ll
paperchalice d1a83ff3e0 [CodeGen] Rename winehprepare -> win-eh-prepare (#75024)
Forgot to rename `winehprepare` for legacy pass when port this pass to
new passmanager.
2023-12-11 13:55:27 +08:00

28 lines
637 B
LLVM

; RUN: opt -win-eh-prepare < %s
; RUN: opt -passes=win-eh-prepare < %s
target triple = "x86_64-pc-windows-msvc"
define void @test1() personality ptr @__CxxFrameHandler3 {
entry:
invoke void @f(i32 1)
to label %exit unwind label %cleanup
cleanup:
%cp = cleanuppad within none []
call void asm sideeffect "", ""()
cleanupret from %cp unwind to caller
exit:
ret void
}
; CHECK-LABEL: define void @test1(
; CHECK: %[[cp:.*]] = cleanuppad within none []
; CHECK-NEXT: call void asm sideeffect "", ""()
; CHECK-NEXT: cleanupret from %[[cp]] unwind to caller
declare void @f(i32)
declare i32 @__CxxFrameHandler3(...)