mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-30 15:45:26 +00:00
A couple of kill marker maintainence bug.
llvm-svn: 48653
This commit is contained in:
parent
3819e559c9
commit
32a6116ffd
@ -432,6 +432,7 @@ SimpleRegisterCoalescing::UpdateRegDefsUses(unsigned SrcReg, unsigned DstReg,
|
||||
for (MachineRegisterInfo::reg_iterator I = mri_->reg_begin(SrcReg),
|
||||
E = mri_->reg_end(); I != E; ) {
|
||||
MachineOperand &O = I.getOperand();
|
||||
MachineInstr *UseMI = &*I;
|
||||
++I;
|
||||
if (DstIsPhys) {
|
||||
unsigned UseSubIdx = O.getSubReg();
|
||||
@ -451,6 +452,9 @@ SimpleRegisterCoalescing::UpdateRegDefsUses(unsigned SrcReg, unsigned DstReg,
|
||||
assert(OldSubIdx < SubIdx && "Conflicting sub-register index!");
|
||||
else if (SubIdx)
|
||||
O.setSubReg(SubIdx);
|
||||
// Remove would-be duplicated kill marker.
|
||||
if (O.isKill() && UseMI->killsRegister(DstReg))
|
||||
O.setIsKill(false);
|
||||
O.setReg(DstReg);
|
||||
}
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ static void UpdateKills(MachineInstr &MI, BitVector &RegKills,
|
||||
if (Reg == 0)
|
||||
continue;
|
||||
|
||||
if (RegKills[Reg]) {
|
||||
if (RegKills[Reg] && KillOps[Reg]->getParent() != &MI) {
|
||||
// That can't be right. Register is killed but not re-defined and it's
|
||||
// being reused. Let's fix that.
|
||||
KillOps[Reg]->setIsKill(false);
|
||||
|
Loading…
Reference in New Issue
Block a user