Turn optimize compares back on with fix. We needed to test that a machine op was

a register before checking if it was defined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110733 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2010-08-10 21:38:11 +00:00
parent a516e94cf1
commit 75486dbf4e
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ STATISTIC(NumReuse, "Number of extension results reused");
// Optimize Comparisons
static cl::opt<bool>
EnableOptCmps("enable-optimize-cmps", cl::init(false), cl::Hidden);
EnableOptCmps("enable-optimize-cmps", cl::init(true), cl::Hidden);
STATISTIC(NumEliminated, "Number of compares eliminated");

View File

@ -1386,7 +1386,7 @@ ConvertToSetZeroFlag(MachineInstr *MI, MachineInstr *CmpInstr) const {
for (unsigned IO = 0, EO = Instr.getNumOperands(); IO != EO; ++IO) {
const MachineOperand &MO = Instr.getOperand(IO);
if (!MO.isDef() || !MO.isReg()) continue;
if (!MO.isReg() || !MO.isDef()) continue;
// This instruction modifies CPSR before the one we want to change. We
// can't do this transformation.