summaryrefslogtreecommitdiff
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
commit813eedd2072edc2db3ca8c5306f7f269d372f45a (patch)
tree076a39e01c743900bc2a1c5d46bb0b14d029957d
parent6db2389d694a5cd8560bc47676a7f3aeba928e73 (diff)
downloadllvm-813eedd2072edc2db3ca8c5306f7f269d372f45a.tar.gz
llvm-813eedd2072edc2db3ca8c5306f7f269d372f45a.tar.bz2
llvm-813eedd2072edc2db3ca8c5306f7f269d372f45a.tar.xz
Fix buildbot breakage where a def is missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107698 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 0a1885f329..c450136001 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/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;