diff options
-rw-r--r-- | lib/CodeGen/PeepholeOptimizer.cpp | 2 | ||||
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/PeepholeOptimizer.cpp b/lib/CodeGen/PeepholeOptimizer.cpp index 7ed41f4..96a2b6e 100644 --- a/lib/CodeGen/PeepholeOptimizer.cpp +++ b/lib/CodeGen/PeepholeOptimizer.cpp @@ -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"); diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index 7e1c84e..5881a12 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -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. |