mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-13 17:06:15 +00:00
Revert r260979 "[X86] Enable the LEA optimization pass by default."
Asserts are still firing in Chromium builds. PR26575. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261058 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c988595b7
commit
84b54daea5
@ -35,10 +35,9 @@ using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "x86-optimize-LEAs"
|
||||
|
||||
static cl::opt<bool>
|
||||
DisableX86LEAOpt("disable-x86-lea-opt", cl::Hidden,
|
||||
cl::desc("X86: Disable LEA optimizations."),
|
||||
cl::init(false));
|
||||
static cl::opt<bool> EnableX86LEAOpt("enable-x86-lea-opt", cl::Hidden,
|
||||
cl::desc("X86: Enable LEA optimizations."),
|
||||
cl::init(false));
|
||||
|
||||
STATISTIC(NumSubstLEAs, "Number of LEA instruction substitutions");
|
||||
STATISTIC(NumRedundantLEAs, "Number of redundant LEA instructions removed");
|
||||
@ -574,7 +573,7 @@ bool OptimizeLEAPass::runOnMachineFunction(MachineFunction &MF) {
|
||||
bool Changed = false;
|
||||
|
||||
// Perform this optimization only if we care about code size.
|
||||
if (DisableX86LEAOpt || !MF.getFunction()->optForSize())
|
||||
if (!EnableX86LEAOpt || !MF.getFunction()->optForSize())
|
||||
return false;
|
||||
|
||||
MRI = &MF.getRegInfo();
|
||||
|
@ -1,5 +1,5 @@
|
||||
; REQUIRES: asserts
|
||||
; RUN: llc < %s -march=x86 -mtriple=i686-pc-win32 | FileCheck %s
|
||||
; RUN: llc < %s -march=x86 -mtriple=i686-pc-win32 -enable-x86-lea-opt | FileCheck %s
|
||||
|
||||
; PR26575
|
||||
; Assertion `(Disp->isImm() || Disp->isGlobal()) && (Other.Disp->isImm() || Other.Disp->isGlobal()) && "Address displacement operand is always an immediate or a global"' failed.
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=x86_64-linux -enable-x86-lea-opt | FileCheck %s
|
||||
|
||||
%struct.anon1 = type { i32, i32, i32 }
|
||||
%struct.anon2 = type { i32, [32 x i32], i32 }
|
||||
|
Loading…
x
Reference in New Issue
Block a user