summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-06 21:06:39 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-06 21:06:39 +0000
commitbcf3409107821371b4bdfc072a8ca0583e566f56 (patch)
tree579bf0ebe4d92a41f36080af45c04b0f1dbd0623 /llvm/lib/CodeGen
parentb36df17b086bbb1a8a2adcfa3d7024d342f25d47 (diff)
downloadbcm5719-llvm-bcf3409107821371b4bdfc072a8ca0583e566f56.tar.gz
bcm5719-llvm-bcf3409107821371b4bdfc072a8ca0583e566f56.zip
Fix buildbot breakage where a def is missing.
llvm-svn: 107698
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 0a1885f329d..c450136001c 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -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;
OpenPOWER on IntegriCloud