Fix buildbot breakage where a def is missing.

llvm-svn: 107698
This commit is contained in:
Jakob Stoklund Olesen 2010-07-06 21:06:39 +00:00
parent 568037d823
commit ec2c876e57

View File

@ -352,6 +352,8 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(const CoalescerPair &CP,
AValNo->isUnused() || AValNo->hasPHIKill())
return false;
MachineInstr *DefMI = li_->getInstructionFromIndex(AValNo->def);
if (!DefMI)
return false;
const TargetInstrDesc &TID = DefMI->getDesc();
if (!TID.isCommutable())
return false;