Skip to content

Commit 5d2c3a0

Browse files
committed
[AArch64] Disable MachineOutliner on Windows.
The handling of unwind info is broken, so disable it for now.
1 parent 74ef6a1 commit 5d2c3a0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6106,6 +6106,10 @@ bool AArch64InstrInfo::isFunctionSafeToOutlineFrom(
61066106
if (!AFI || AFI->hasRedZone().getValueOr(true))
61076107
return false;
61086108

6109+
// FIXME: Teach the outliner to generate/handle Windows unwind info.
6110+
if (MF.getTarget().getMCAsmInfo()->usesWindowsCFI())
6111+
return false;
6112+
61096113
// It's safe to outline from MF.
61106114
return true;
61116115
}

llvm/test/CodeGen/AArch64/machine-outliner-calls.mir

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# RUN: llc -mtriple=aarch64--- -run-pass=prologepilog -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s
2+
# RUN: llc -mtriple=aarch64-pc-windows-msvc -run-pass=prologepilog -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s -check-prefix=WINDOWS
23
--- |
34
define void @baz() #0 {
45
ret void
@@ -65,3 +66,4 @@ body: |
6566
# CHECK-NEXT: $w17 = ORRWri $wzr, 1
6667
# CHECK-NEXT: early-clobber $sp, $lr = LDRXpost $sp, 16
6768
# CHECK-NEXT: RET $lr
69+
# WINDOWS-NOT: OUTLINED

0 commit comments

Comments
 (0)