1; RUN: llc -mtriple=x86_64-pc-windows-coreclr < %s | FileCheck %s 2 3declare void @ProcessCLRException() 4 5declare void @f() 6 7define void @test1() personality void ()* @ProcessCLRException { 8entry: 9 invoke void @f() 10 to label %exit unwind label %catch.dispatch.1 11exit: 12 ret void 13 14catch.dispatch.1: 15 %cs1 = catchswitch within none [label %outer.catch] unwind to caller 16 17outer.catch: 18 %cp1 = catchpad within %cs1 [i32 1] 19 invoke void @f() [ "funclet"(token %cp1) ] 20 to label %outer.ret unwind label %catch.dispatch.2 21outer.ret: 22 catchret from %cp1 to label %exit 23 24catch.dispatch.2: 25 %cs2 = catchswitch within %cp1 [label %inner.catch] unwind to caller 26inner.catch: 27 %cp2 = catchpad within %cs2 [i32 2] 28 catchret from %cp2 to label %outer.ret 29} 30 31; Check the catchret targets 32; CHECK-LABEL: test1: # @test1 33; CHECK: [[Exit:^[^: ]+]]: # Block address taken 34; CHECK-NEXT: # %exit 35; CHECK: [[OuterRet:^[^: ]+]]: # Block address taken 36; CHECK-NEXT: # %outer.ret 37; CHECK-NEXT: leaq [[Exit]](%rip), %rax 38; CHECK: retq # CATCHRET 39; CHECK: {{^[^: ]+}}: # %inner.catch 40; CHECK: .seh_endprolog 41; CHECK-NEXT: leaq [[OuterRet]](%rip), %rax 42; CHECK: retq # CATCHRET 43