mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-22 20:43:44 +02:00
d888298118
Summary: This ensures that BranchFolding (and similar) won't remove these blocks. Also allow AsmPrinter::EmitBasicBlockStart to process MBBs which are address-taken but do not have BBs that are address-taken, since otherwise its call to getAddrLabelSymbolTableToEmit would fail an assertion on such blocks. I audited the other callers of getAddrLabelSymbolTableToEmit (and getAddrLabelSymbol); they all have BBs known to be address-taken except for the call through getAddrLabelSymbol from WinException::create32bitRef; that call is actually now unreachable, so I've removed it and updated the signature of create32bitRef. This fixes PR25168. Reviewers: majnemer, andrew.w.kaylor, rnk Subscribers: pgavlin, llvm-commits Differential Revision: http://reviews.llvm.org/D13774 llvm-svn: 251113
44 lines
1.2 KiB
LLVM
44 lines
1.2 KiB
LLVM
; RUN: llc -mtriple=x86_64-pc-windows-coreclr < %s | FileCheck %s
|
|
|
|
declare void @ProcessCLRException()
|
|
|
|
declare void @f()
|
|
|
|
define void @test1() personality void ()* @ProcessCLRException {
|
|
entry:
|
|
invoke void @f()
|
|
to label %exit unwind label %outer.pad
|
|
outer.pad:
|
|
%outer = catchpad [i32 1]
|
|
to label %outer.catch unwind label %outer.end
|
|
outer.catch:
|
|
invoke void @f()
|
|
to label %outer.ret unwind label %inner.pad
|
|
inner.pad:
|
|
%inner = catchpad [i32 2]
|
|
to label %inner.ret unwind label %inner.end
|
|
inner.ret:
|
|
catchret %inner to label %outer.ret
|
|
inner.end:
|
|
catchendpad unwind label %outer.end
|
|
outer.ret:
|
|
catchret %outer to label %exit
|
|
outer.end:
|
|
catchendpad unwind to caller
|
|
exit:
|
|
ret void
|
|
}
|
|
|
|
; Check the catchret targets
|
|
; CHECK-LABEL: test1: # @test1
|
|
; CHECK: [[Exit:^[^: ]+]]: # Block address taken
|
|
; CHECK-NEXT: # %exit
|
|
; CHECK: [[OuterRet:^[^: ]+]]: # Block address taken
|
|
; CHECK-NEXT: # %outer.ret
|
|
; CHECK-NEXT: leaq [[Exit]](%rip), %rax
|
|
; CHECK: retq # CATCHRET
|
|
; CHECK: {{^[^: ]+}}: # %inner.pad
|
|
; CHECK: .seh_endprolog
|
|
; CHECK-NEXT: leaq [[OuterRet]](%rip), %rax
|
|
; CHECK: retq # CATCHRET
|