[llvm-commits] [llvm] r110733 - in /llvm/trunk/lib: CodeGen/PeepholeOptimizer.cpp Target/ARM/ARMBaseInstrInfo.cpp

Bill Wendling isanbard at gmail.com
Tue Aug 10 14:38:12 PDT 2010


Author: void
Date: Tue Aug 10 16:38:11 2010
New Revision: 110733

URL: http://llvm.org/viewvc/llvm-project?rev=110733&view=rev
Log:
Turn optimize compares back on with fix. We needed to test that a machine op was
a register before checking if it was defined.

Modified:
    llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
    llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp

Modified: llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp?rev=110733&r1=110732&r2=110733&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp (original)
+++ llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp Tue Aug 10 16:38:11 2010
@@ -54,7 +54,7 @@
 
 // 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");
 

Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=110733&r1=110732&r2=110733&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Tue Aug 10 16:38:11 2010
@@ -1386,7 +1386,7 @@
 
     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.





More information about the llvm-commits mailing list