mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-27 22:55:15 +00:00
Update kill flags while rewriting instructions after splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117959 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c2bf50245f
commit
79cb53ce95
@ -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…
Reference in New Issue
Block a user