summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-03-26 22:40:42 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-03-26 22:40:42 +0000
commitad7ccf34b5de14bd2b9ddc8072d14582a2ce29d9 (patch)
tree4b2db63d55c7c3cce6634259e4da783da0717eb8 /lib/CodeGen/LiveIntervalAnalysis.cpp
parent497b0b0a455dc2300a5b8bb1e64dc3f82afc9acf (diff)
downloadllvm-ad7ccf34b5de14bd2b9ddc8072d14582a2ce29d9.tar.gz
llvm-ad7ccf34b5de14bd2b9ddc8072d14582a2ce29d9.tar.bz2
llvm-ad7ccf34b5de14bd2b9ddc8072d14582a2ce29d9.tar.xz
Fix for PR1266. Don't mark a two address operand IsKill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index ab8a18d1df..38ada30ad7 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -854,9 +854,9 @@ bool LiveIntervals::AdjustCopiesBackFrom(LiveInterval &IntA, LiveInterval &IntB,
// 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();
+ int UIdx = ValLREndInst->findRegisterUseOperand(IntB.reg, true);
+ if (UIdx != -1)
+ ValLREndInst->getOperand(UIdx).unsetIsKill();
// Finally, delete the copy instruction.
RemoveMachineInstrFromMaps(CopyMI);