Also use shrinkToUses after AdjustCopiesBackFrom().
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 18 May 2011 04:51:12 +0000 (04:51 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 18 May 2011 04:51:12 +0000 (04:51 +0000)
The 'last use' may not be in the same basic block, and we still want a correct
live range.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131523 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SimpleRegisterCoalescing.cpp

index f55dc7dab57fa9d38921b7b2ecf5557b04674f61..7aa39c5160ab574dce51e4d091be65018b6537f9 100644 (file)
@@ -272,7 +272,7 @@ bool SimpleRegisterCoalescing::AdjustCopiesBackFrom(const CoalescerPair &CP,
   // merge, find the last use and trim the live range. That will also add the
   // isKill marker.
   if (ALR->end == CopyIdx)
-    TrimLiveIntervalToLastUse(CopyUseIdx, CopyMI->getParent(), IntA, ALR);
+    li_->shrinkToUses(&IntA);
 
   ++numExtends;
   return true;