From c8ec765551119d5bdcfeebdaeb869242c098bdc5 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 29 Mar 2011 03:12:04 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SplitKit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp index a9ad731da6d..b89ff0c4fc8 100644 --- a/lib/CodeGen/SplitKit.cpp +++ b/lib/CodeGen/SplitKit.cpp @@ -928,7 +928,8 @@ void SplitEditor::splitSingleBlocks(const SplitAnalysis::BlockPtrSet &Blocks) { 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 {