Fix an extremely stupid bug that prevented first round of coalescing (physical registers only) from happening.

llvm-svn: 42820
This commit is contained in:
Evan Cheng 2007-10-09 23:36:27 +00:00
parent 5d45178179
commit ad55a6079a
1 changed files with 2 additions and 1 deletions

View File

@ -861,7 +861,8 @@ void SimpleRegisterCoalescing::CopyCoalesceInMBB(MachineBasicBlock *MBB,
unsigned SrcReg, DstReg;
if (!tii_->isMoveInstr(*Inst, SrcReg, DstReg)) continue;
if (TryAgain && !JoinCopy(Inst, SrcReg, DstReg, PhysOnly))
bool Success = JoinCopy(Inst, SrcReg, DstReg, PhysOnly);
if (TryAgain && !Success)
TryAgain->push_back(getCopyRec(Inst, SrcReg, DstReg));
}
}