mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-23 20:34:58 +00:00
Fix the new load-unfolding code to update LiveVariable's dead flags,
in addition to the kill flags. llvm-svn: 106512
This commit is contained in:
parent
6a07aa9ae8
commit
ac0b4b5352
@ -961,8 +961,14 @@ TryInstructionTransform(MachineBasicBlock::iterator &mi,
|
||||
if (LV) {
|
||||
for (unsigned i = 0, e = mi->getNumOperands(); i != e; ++i) {
|
||||
MachineOperand &MO = mi->getOperand(i);
|
||||
if (MO.isReg() && MO.isUse() && MO.isKill())
|
||||
LV->replaceKillInstruction(Reg, mi, NewMIs[0]);
|
||||
if (MO.isReg() && MO.getReg() != 0 &&
|
||||
TargetRegisterInfo::isVirtualRegister(MO.getReg())) {
|
||||
if (MO.isUse()) {
|
||||
if (MO.isKill())
|
||||
LV->replaceKillInstruction(MO.getReg(), mi, NewMIs[0]);
|
||||
} else if (LV->removeVirtualRegisterDead(MO.getReg(), mi))
|
||||
LV->addVirtualRegisterDead(MO.getReg(), NewMIs[1]);
|
||||
}
|
||||
}
|
||||
LV->addVirtualRegisterKilled(Reg, NewMIs[1]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user