forked from OSchip/llvm-project
Turn optimize compares back on with fix. We needed to test that a machine op was
a register before checking if it was defined. llvm-svn: 110733
This commit is contained in:
parent
705c3b6aaa
commit
0757820f8f
|
@ -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");
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue