summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-29 03:12:04 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-29 03:12:04 +0000
commitc8ec765551119d5bdcfeebdaeb869242c098bdc5 (patch)
treeac416826e4660a83b0135c44e9187c60816e8c75 /lib
parent2ef661b0e8de0d4186c5f9cc990adce0a2493b17 (diff)
downloadllvm-c8ec765551119d5bdcfeebdaeb869242c098bdc5.tar.gz
llvm-c8ec765551119d5bdcfeebdaeb869242c098bdc5.tar.bz2
llvm-c8ec765551119d5bdcfeebdaeb869242c098bdc5.tar.xz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SplitKit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp
index a9ad731da6..b89ff0c4fc 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 {