diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-08-10 21:38:11 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-08-10 21:38:11 +0000 |
commit | 75486dbf4e9611f2070bf13b874f78a5587ed7ff (patch) | |
tree | 28a6fa52f0bf2d7cb8c427b72c47362a3421374f /lib | |
parent | a516e94cf159b9ea02af31872fc59b7ceeef7965 (diff) | |
download | external_llvm-75486dbf4e9611f2070bf13b874f78a5587ed7ff.zip external_llvm-75486dbf4e9611f2070bf13b874f78a5587ed7ff.tar.gz external_llvm-75486dbf4e9611f2070bf13b874f78a5587ed7ff.tar.bz2 |
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
Diffstat (limited to 'lib')
-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. |