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 b36df17b08
commit bcf3409107

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;