1 ; RUN: llc -mtriple=x86_64-pc-windows-coreclr < %s | FileCheck %s
3 declare void @ProcessCLRException()
7 define void @test1() personality void ()* @ProcessCLRException {
10 to label %exit unwind label %outer.pad
12 %outer = catchpad [i32 1]
13 to label %outer.catch unwind label %outer.end
16 to label %outer.ret unwind label %inner.pad
18 %inner = catchpad [i32 2]
19 to label %inner.ret unwind label %inner.end
21 catchret %inner to label %outer.ret
23 catchendpad unwind label %outer.end
25 catchret %outer to label %exit
27 catchendpad unwind to caller
32 ; Check the catchret targets
33 ; CHECK-LABEL: test1: # @test1
34 ; CHECK: [[Exit:^[^: ]+]]: # %exit
35 ; CHECK: [[OuterRet:^[^: ]+]]: # %outer.ret
36 ; CHECK-NEXT: leaq [[Exit]](%rip), %rax
37 ; CHECK: retq # CATCHRET
38 ; CHECK: {{^[^: ]+}}: # %inner.pad
39 ; CHECK: .seh_endprolog
40 ; CHECK-NEXT: leaq [[OuterRet]](%rip), %rax
41 ; CHECK: retq # CATCHRET