1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Revert r260507: "[X86] Enable the LEA optimization pass by default."

This caused PR26575.

llvm-svn: 260538
This commit is contained in:
Hans Wennborg 2016-02-11 16:44:06 +00:00
parent a57736cc50
commit 3625a4f59b
2 changed files with 5 additions and 6 deletions

View File

@ -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");
@ -569,7 +568,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();

View File

@ -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 }