Intervals are half-open.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 5 Oct 2010 22:19:29 +0000 (22:19 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 5 Oct 2010 22:19:29 +0000 (22:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115694 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SplitKit.cpp

index cce97fdb67d9206bbce3a7e1e22c5f3569ad4a0e..bd164a30d9db520eb8191c96bdf9350dc870077e 100644 (file)
@@ -550,7 +550,7 @@ void LiveIntervalMap::addSimpleRange(SlotIndex Start, SlotIndex End,
 
   // ParentVNI is a complex value. We must map per MBB.
   MachineFunction::iterator MBB = lis_.getMBBFromIndex(Start);
-  MachineFunction::iterator MBBE = lis_.getMBBFromIndex(End);
+  MachineFunction::iterator MBBE = lis_.getMBBFromIndex(End.getPrevSlot());
 
   if (MBB == MBBE) {
     li_->addRange(LiveRange(Start, End, VNI));