From 9164b9b16e48092162758eef0cf6accf6d210add Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 31 Jul 2018 00:43:54 +0000 Subject: [PATCH] [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 --- llvm/lib/Target/X86/X86FixupLEAs.cpp | 2 +- llvm/test/CodeGen/X86/atom-fixup-lea2.ll | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Target/X86/X86FixupLEAs.cpp b/llvm/lib/Target/X86/X86FixupLEAs.cpp index d85389a0a7f1..f3f7f6a37360 100644 --- a/llvm/lib/Target/X86/X86FixupLEAs.cpp +++ b/llvm/lib/Target/X86/X86FixupLEAs.cpp @@ -578,7 +578,7 @@ bool FixupLEAPass::processBasicBlock(MachineFunction &MF, continue; if (OptLEA) { - if (MF.getSubtarget().isSLM()) + if (MF.getSubtarget().slowLEA()) processInstructionForSLM(I, MFI); else { diff --git a/llvm/test/CodeGen/X86/atom-fixup-lea2.ll b/llvm/test/CodeGen/X86/atom-fixup-lea2.ll index 9b0b472be0f3..b8a0369a45f4 100644 --- a/llvm/test/CodeGen/X86/atom-fixup-lea2.ll +++ b/llvm/test/CodeGen/X86/atom-fixup-lea2.ll @@ -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