1; RUN: opt -winehprepare < %s
2
3target triple = "x86_64-pc-windows-msvc"
4
5define void @test1() personality i32 (...)* @__CxxFrameHandler3 {
6entry:
7  invoke void @f(i32 1)
8     to label %exit unwind label %cleanup
9
10cleanup:
11  %cp = cleanuppad within none []
12  call void asm sideeffect "", ""()
13  cleanupret from %cp unwind to caller
14
15exit:
16  ret void
17}
18
19; CHECK-LABEL: define void @test1(
20; CHECK:      %[[cp:.*]] = cleanuppad within none []
21; CHECK-NEXT: call void asm sideeffect "", ""()
22; CHECK-NEXT: cleanupret from %[[cp]] unwind to caller
23
24declare void @f(i32)
25
26declare i32 @__CxxFrameHandler3(...)
27