aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/PreAllocSplitting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r--lib/CodeGen/PreAllocSplitting.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp
index 1b2b635f39..456be09ecd 100644
--- a/lib/CodeGen/PreAllocSplitting.cpp
+++ b/lib/CodeGen/PreAllocSplitting.cpp
@@ -457,8 +457,12 @@ PreAllocSplitting::ShrinkWrapLiveInterval(VNInfo *ValNo,
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);
}