mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Remove unnecessary subtraction and addition by 1 around a couple for loops.
llvm-svn: 167673
This commit is contained in:
parent
f04d47d0ca
commit
f8089e0864
@ -12858,9 +12858,9 @@ static MachineBasicBlock *EmitPCMPSTRM(MachineInstr *MI, MachineBasicBlock *BB,
|
|||||||
DebugLoc dl = MI->getDebugLoc();
|
DebugLoc dl = MI->getDebugLoc();
|
||||||
MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(Opc));
|
MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(Opc));
|
||||||
|
|
||||||
unsigned NumArgs = MI->getNumOperands() - 1;
|
unsigned NumArgs = MI->getNumOperands();
|
||||||
for (unsigned i = 0; i < NumArgs; ++i) {
|
for (unsigned i = 1; i < NumArgs; ++i) {
|
||||||
MachineOperand &Op = MI->getOperand(i+1);
|
MachineOperand &Op = MI->getOperand(i);
|
||||||
if (!(Op.isReg() && Op.isImplicit()))
|
if (!(Op.isReg() && Op.isImplicit()))
|
||||||
MIB.addOperand(Op);
|
MIB.addOperand(Op);
|
||||||
}
|
}
|
||||||
@ -12895,9 +12895,9 @@ static MachineBasicBlock *EmitPCMPSTRI(MachineInstr *MI, MachineBasicBlock *BB,
|
|||||||
DebugLoc dl = MI->getDebugLoc();
|
DebugLoc dl = MI->getDebugLoc();
|
||||||
MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(Opc));
|
MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(Opc));
|
||||||
|
|
||||||
unsigned NumArgs = MI->getNumOperands() - 1; // remove the results
|
unsigned NumArgs = MI->getNumOperands(); // remove the results
|
||||||
for (unsigned i = 0; i < NumArgs; ++i) {
|
for (unsigned i = 1; i < NumArgs; ++i) {
|
||||||
MachineOperand &Op = MI->getOperand(i+1);
|
MachineOperand &Op = MI->getOperand(i);
|
||||||
if (!(Op.isReg() && Op.isImplicit()))
|
if (!(Op.isReg() && Op.isImplicit()))
|
||||||
MIB.addOperand(Op);
|
MIB.addOperand(Op);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user