brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 696ab1a Raw
45 lines · plain
1; RUN: llc -mtriple=x86_64-pc-windows-coreclr < %s | FileCheck %s2 3declare void @ProcessCLRException()4 5declare void @f()6 7define void @test1() personality ptr @ProcessCLRException {8entry:9  invoke void @f()10          to label %exit unwind label %catch.dispatch.111exit:12  ret void13 14catch.dispatch.1:15  %cs1 = catchswitch within none [label %outer.catch] unwind to caller16 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.221outer.ret:22  catchret from %cp1 to label %exit23 24catch.dispatch.2:25  %cs2 = catchswitch within %cp1 [label %inner.catch] unwind to caller26inner.catch:27  %cp2 = catchpad within %cs2 [i32 2]28  catchret from %cp2 to label %outer.ret29}30 31; Check the catchret targets32; CHECK-LABEL: test1: # @test133; CHECK: [[Exit:^[^: ]+]]: # Block address taken34; CHECK-NEXT:              # %exit35; CHECK-NEXT: $ehgcr_0_1:36; CHECK: [[OuterRet:^[^: ]+]]: # Block address taken37; CHECK-NEXT:                  # %outer.ret38; CHECK-NEXT: $ehgcr_0_3:39; CHECK-NEXT: leaq [[Exit]](%rip), %rax40; CHECK:      retq   # CATCHRET41; CHECK: {{^[^: ]+}}: # %inner.catch42; CHECK: .seh_endprolog43; CHECK-NEXT: leaq [[OuterRet]](%rip), %rax44; CHECK:      retq   # CATCHRET45