mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 20:32:19 +00:00
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:
parent
a516e94cf1
commit
75486dbf4e
@ -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
Block a user