Handle the special case when all uses follow the last split point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128450 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp
index a9ad731..b89ff0c 100644
--- a/lib/CodeGen/SplitKit.cpp
+++ b/lib/CodeGen/SplitKit.cpp
@@ -928,7 +928,8 @@
continue;
openIntv();
- SlotIndex SegStart = enterIntvBefore(BI.FirstUse);
+ SlotIndex SegStart = enterIntvBefore(std::min(BI.FirstUse,
+ BI.LastSplitPoint));
if (!BI.LiveOut || BI.LastUse < BI.LastSplitPoint) {
useIntv(SegStart, leaveIntvAfter(BI.LastUse));
} else {