xref: /aosp_15_r20/external/llvm/test/CodeGen/WinEH/wineh-asm.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt -winehprepare < %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-pc-windows-msvc"
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine void @test1() personality i32 (...)* @__CxxFrameHandler3 {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker  invoke void @f(i32 1)
8*9880d681SAndroid Build Coastguard Worker     to label %exit unwind label %cleanup
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workercleanup:
11*9880d681SAndroid Build Coastguard Worker  %cp = cleanuppad within none []
12*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "", ""()
13*9880d681SAndroid Build Coastguard Worker  cleanupret from %cp unwind to caller
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Workerexit:
16*9880d681SAndroid Build Coastguard Worker  ret void
17*9880d681SAndroid Build Coastguard Worker}
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: define void @test1(
20*9880d681SAndroid Build Coastguard Worker; CHECK:      %[[cp:.*]] = cleanuppad within none []
21*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: call void asm sideeffect "", ""()
22*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: cleanupret from %[[cp]] unwind to caller
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Workerdeclare void @f(i32)
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Workerdeclare i32 @__CxxFrameHandler3(...)
27