xref: /llvm-project/llvm/test/CodeGen/WinEH/wineh-asm.ll (revision d1a83ff3e0274f26746e874d480c866bec3818d6)
1; RUN: opt -win-eh-prepare < %s
2; RUN: opt -passes=win-eh-prepare < %s
3
4target triple = "x86_64-pc-windows-msvc"
5
6define void @test1() personality ptr @__CxxFrameHandler3 {
7entry:
8  invoke void @f(i32 1)
9     to label %exit unwind label %cleanup
10
11cleanup:
12  %cp = cleanuppad within none []
13  call void asm sideeffect "", ""()
14  cleanupret from %cp unwind to caller
15
16exit:
17  ret void
18}
19
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
24
25declare void @f(i32)
26
27declare i32 @__CxxFrameHandler3(...)
28