[X86] Stop accidentally running the Bonnell LEA fixup path on Goldmont.

In one place we checked X86Subtarget.slowLEA() to decide if the pass should run. But to decide what the pass should we only check isSLM. This resulted in Goldmont going down the Bonnell path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338342 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2018-07-31 00:43:54 +00:00
parent f7d1ac1d98
commit 816cd63476
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -578,7 +578,7 @@ bool FixupLEAPass::processBasicBlock(MachineFunction &MF,
continue;
if (OptLEA) {
if (MF.getSubtarget<X86Subtarget>().isSLM())
if (MF.getSubtarget<X86Subtarget>().slowLEA())
processInstructionForSLM(I, MFI);
else {
-1
View File
@@ -1,5 +1,4 @@
; RUN: llc < %s -mcpu=atom -mtriple=i686-linux | FileCheck %s
; RUN: llc < %s -mcpu=goldmont -mtriple=i686-linux | FileCheck %s
; CHECK:%bb.5
; CHECK-NEXT:leal