RegisterCoalescer: With subrange liveness there may be no RedefVNI for unused lanes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224805 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthias Braun 2014-12-24 02:11:48 +00:00
parent a2fd5b5fd0
commit 02add3f1a6

View File

@ -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.