1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Obvious unnecessary loop removal. Follow through from previous checkin.

llvm-svn: 149398
This commit is contained in:
Andrew Trick 2012-01-31 18:54:19 +00:00
parent b8688eac99
commit d03ff2ba28

View File

@ -775,17 +775,16 @@ void RAFast::addRetOperands(MachineBasicBlock *MBB) {
continue;
unsigned OperReg = MO.getReg();
for (const unsigned *AS = TRI->getOverlaps(Reg); *AS; ++AS) {
if (OperReg != *AS)
continue;
if (OperReg == Reg || TRI->isSuperRegister(OperReg, Reg)) {
// If the ret already has an operand for this physreg or a superset,
// don't duplicate it. Set the kill flag if the value is defined.
if (hasDef && !MO.isKill())
MO.setIsKill();
Found = true;
break;
}
if (!TargetRegisterInfo::isPhysicalRegister(OperReg))
continue;
if (OperReg == Reg || TRI->isSuperRegister(OperReg, Reg)) {
// If the ret already has an operand for this physreg or a superset,
// don't duplicate it. Set the kill flag if the value is defined.
if (hasDef && !MO.isKill())
MO.setIsKill();
Found = true;
break;
}
}
if (!Found)