1 ; RUN: opt -win-eh-prepare < %s
2 ; RUN: opt -passes=win-eh-prepare < %s
4 target triple = "x86_64-pc-windows-msvc"
6 define void @test1() personality ptr @__CxxFrameHandler3 {
9 to label %exit unwind label %cleanup
12 %cp = cleanuppad within none []
13 call void asm sideeffect "", ""()
14 cleanupret from %cp unwind to caller
20 ; CHECK-LABEL: define void @test1(
21 ; CHECK: %[[cp:.*]] = cleanuppad within none []
22 ; CHECK-NEXT: call void asm sideeffect "", ""()
23 ; CHECK-NEXT: cleanupret from %[[cp]] unwind to caller
27 declare i32 @__CxxFrameHandler3(...)