From 02add3f1a6f3d5c67f1ce129e4a7a517c2b95799 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 24 Dec 2014 02:11:48 +0000 Subject: [PATCH] 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 --- lib/CodeGen/RegisterCoalescer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index 8220bd46136..cc4d5590b6a 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/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. -- 2.34.1