From: Jakob Stoklund Olesen Date: Wed, 18 May 2011 04:51:12 +0000 (+0000) Subject: Also use shrinkToUses after AdjustCopiesBackFrom(). X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c6b9ebdd6400c5ade1b5b211252cd251b6ef07ae;p=oota-llvm.git Also use shrinkToUses after AdjustCopiesBackFrom(). 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 --- diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index f55dc7dab57..7aa39c5160a 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -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;