Handle <def,undef> in the second loop as well.

llvm-svn: 130718
This commit is contained in:
Jakob Stoklund Olesen 2011-05-02 20:36:53 +00:00
parent 30458b51e3
commit 16f7cf6a2f
1 changed files with 3 additions and 1 deletions

View File

@ -181,12 +181,14 @@ void RegScavenger::forward() {
// Verify uses and defs.
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);
if (!MO.isReg() || MO.isUndef())
if (!MO.isReg())
continue;
unsigned Reg = MO.getReg();
if (!Reg || isReserved(Reg))
continue;
if (MO.isUse()) {
if (MO.isUndef())
continue;
if (!isUsed(Reg)) {
// Check if it's partial live: e.g.
// D0 = insert_subreg D0<undef>, S0