summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegisterCoalescer.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-12-24 02:11:48 +0000
committerMatthias Braun <matze@braunis.de>2014-12-24 02:11:48 +0000
commit7030dda8d5c680534a8a1bbfb371db69025e40cb (patch)
treefe38361c68f7503ede0dcd5adb30accba57c1661 /llvm/lib/CodeGen/RegisterCoalescer.cpp
parent36768c684f2b7ba5b9dd9874c1ddb5ecd8fbaa29 (diff)
downloadbcm5719-llvm-7030dda8d5c680534a8a1bbfb371db69025e40cb.tar.gz
bcm5719-llvm-7030dda8d5c680534a8a1bbfb371db69025e40cb.zip
RegisterCoalescer: With subrange liveness there may be no RedefVNI for unused lanes.
llvm-svn: 224805
Diffstat (limited to 'llvm/lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 8220bd46136..cc4d5590b6a 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -1817,9 +1817,12 @@ JoinVals::analyzeValue(unsigned ValNo, JoinVals &Other) {
// not important.
if (Redef) {
V.RedefVNI = LR.Query(VNI->def).valueIn();
- assert(V.RedefVNI && "Instruction is reading nonexistent value");
- computeAssignment(V.RedefVNI->id, Other);
- V.ValidLanes |= Vals[V.RedefVNI->id].ValidLanes;
+ assert(TrackSubRegLiveness || V.RedefVNI &&
+ "Instruction is reading nonexistent value");
+ if (V.RedefVNI != nullptr) {
+ computeAssignment(V.RedefVNI->id, Other);
+ V.ValidLanes |= Vals[V.RedefVNI->id].ValidLanes;
+ }
}
// An IMPLICIT_DEF writes undef values.
OpenPOWER on IntegriCloud