summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-25 09:41:59 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-25 09:41:59 +0000
commit16191f03337645dc1638b7489d71d685e6c07cdd (patch)
treea8c83e72ed905ecdbd0e9bb9cda9e8e478ca443d /lib/CodeGen/LiveIntervalAnalysis.cpp
parentbc025fbb64038b9f2c6615dd2d090c1c2ba0a91c (diff)
downloadllvm-16191f03337645dc1638b7489d71d685e6c07cdd.tar.gz
llvm-16191f03337645dc1638b7489d71d685e6c07cdd.tar.bz2
llvm-16191f03337645dc1638b7489d71d685e6c07cdd.tar.xz
If the liveinterval of the source instruction has been extended, remove the IsKill marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index ce2e4290b1..5e17a734a2 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -828,6 +828,12 @@ bool LiveIntervals::AdjustCopiesBackFrom(LiveInterval &IntA, LiveInterval &IntB,
IntB.MergeValueNumberInto(BValNo, ValLR->ValId);
DOUT << " result = "; IntB.print(DOUT, mri_);
DOUT << "\n";
+
+ // If the source instruction was killing the source register before the
+ // merge, unset the isKill marker given the live range has been extended.
+ MachineOperand *MOK = ValLREndInst->findRegisterUseOperand(IntB.reg, true);
+ if (MOK)
+ MOK->unsetIsKill();
// Finally, delete the copy instruction.
RemoveMachineInstrFromMaps(CopyMI);