summaryrefslogtreecommitdiffstats
path: root/llvm/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
commite54eb807207ede2b3d42068348852059c2d5da1b (patch)
treea563b0fd42ceaa106e6d25bfcc554c856e3aa92d /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent220a7af107395309addd9f84411549f463ba9746 (diff)
downloadbcm5719-llvm-e54eb807207ede2b3d42068348852059c2d5da1b.tar.gz
bcm5719-llvm-e54eb807207ede2b3d42068348852059c2d5da1b.zip
If the liveinterval of the source instruction has been extended, remove the IsKill marker.
llvm-svn: 34594
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index ce2e4290b16..5e17a734a21 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud