From ad7ccf34b5de14bd2b9ddc8072d14582a2ce29d9 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 26 Mar 2007 22:40:42 +0000 Subject: 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 --- lib/CodeGen/LiveIntervalAnalysis.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp') 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); -- cgit v1.2.3-70-g09d2