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
This commit is contained in:
Evan Cheng
2007-03-26 22:40:42 +00:00
parent 497b0b0a45
commit ad7ccf34b5
2 changed files with 33 additions and 22 deletions

View File

@ -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);