git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223882
91177308-0d34-0410-b5e6-
96231b3b80d8
if (TheDelegate)
TheDelegate->LRE_WillShrinkVirtReg(LI.reg);
LI.removeValNo(VNI);
- if (LI.empty())
+ if (LI.empty()) {
RegsToErase.push_back(Reg);
+ } else {
+ // Also remove the value in subranges.
+ for (LiveInterval::subrange_iterator S = LI.subrange_begin(),
+ SE = LI.subrange_end(); S != SE; ++S) {
+ if (VNInfo *SVNI = S->getVNInfoAt(Idx))
+ S->removeValNo(SVNI);
+ }
+ }
}
}
}