If the tied registers are already the same, there is no need to change

them.  Move the code to make that change inside the conditional.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bob Wilson 2009-08-31 21:54:16 +00:00
parent 768f1dd48f
commit d4034b2825

View File

@ -985,7 +985,6 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
mi->getOperand(i).getReg() == regB)
mi->getOperand(i).setReg(regA);
}
}
assert(mi->getOperand(ti).isDef() && mi->getOperand(si).isUse());
mi->getOperand(ti).setReg(mi->getOperand(si).getReg());
@ -993,6 +992,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
DEBUG(errs() << "\t\trewrite to:\t" << *mi);
}
}
mi = nmi;
}