[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.

llvm-svn: 338342
This commit is contained in:
Craig Topper 2018-07-31 00:43:54 +00:00
parent 2baa767455
commit 9164b9b16e
2 changed files with 1 additions and 2 deletions

View File

@ -578,7 +578,7 @@ bool FixupLEAPass::processBasicBlock(MachineFunction &MF,
continue; continue;
if (OptLEA) { if (OptLEA) {
if (MF.getSubtarget<X86Subtarget>().isSLM()) if (MF.getSubtarget<X86Subtarget>().slowLEA())
processInstructionForSLM(I, MFI); processInstructionForSLM(I, MFI);
else { else {

View File

@ -1,5 +1,4 @@
; RUN: llc < %s -mcpu=atom -mtriple=i686-linux | FileCheck %s ; RUN: llc < %s -mcpu=atom -mtriple=i686-linux | FileCheck %s
; RUN: llc < %s -mcpu=goldmont -mtriple=i686-linux | FileCheck %s
; CHECK:%bb.5 ; CHECK:%bb.5
; CHECK-NEXT:leal ; CHECK-NEXT:leal