mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-16 08:29:08 +00:00
Update kill flags while rewriting instructions after splitting.
llvm-svn: 117959
This commit is contained in:
parent
69e7c09c32
commit
78ba455b51
@ -822,6 +822,7 @@ void SplitEditor::rewrite(unsigned reg) {
|
||||
for (MachineRegisterInfo::reg_iterator RI = mri_.reg_begin(reg),
|
||||
RE = mri_.reg_end(); RI != RE;) {
|
||||
MachineOperand &MO = RI.getOperand();
|
||||
unsigned OpNum = RI.getOperandNo();
|
||||
MachineInstr *MI = MO.getParent();
|
||||
++RI;
|
||||
if (MI->isDebugValue()) {
|
||||
@ -844,6 +845,8 @@ void SplitEditor::rewrite(unsigned reg) {
|
||||
DEBUG(dbgs() << " rewr BB#" << MI->getParent()->getNumber() << '\t'<< Idx);
|
||||
assert(LI && "No register was live at use");
|
||||
MO.setReg(LI->reg);
|
||||
if (MO.isUse() && !MI->isRegTiedToDefOperand(OpNum))
|
||||
MO.setIsKill(LI->killedAt(Idx.getDefIndex()));
|
||||
DEBUG(dbgs() << '\t' << *MI);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user