Handle cases where there aren't uses in the barrier mbb.

llvm-svn: 58174
diff --git a/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp
index 1b2b635..456be09 100644
--- a/llvm/lib/CodeGen/PreAllocSplitting.cpp
+++ b/llvm/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);
   }