Handle cases where there aren't uses in the barrier mbb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58174 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp
index 1b2b635..456be09 100644
--- a/lib/CodeGen/PreAllocSplitting.cpp
+++ b/lib/CodeGen/PreAllocSplitting.cpp
@@ -457,8 +457,12 @@
DefMI->eraseFromParent();
CurrLI->removeRange(ValNo->def, LIs->getMBBEndIdx(MBB)+1);
}
+ } else if (MBB == BarrierMBB) {
+ // Remove entire live range from start of mbb to barrier.
+ CurrLI->removeRange(LIs->getMBBStartIdx(MBB),
+ LIs->getUseIndex(BarrierIdx)+1);
} else {
- // Remove entire live range of the bb out of the live interval.
+ // Remove entire live range of the mbb out of the live interval.
CurrLI->removeRange(LIs->getMBBStartIdx(MBB), LIs->getMBBEndIdx(MBB)+1);
}