Commit a43e2fd3 authored by Craig Topper's avatar Craig Topper
Browse files

Remove unnecessary subtraction and addition by 1 around a couple for loops.

llvm-svn: 167673
parent 61167ab2
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -12858,9 +12858,9 @@ static MachineBasicBlock *EmitPCMPSTRM(MachineInstr *MI, MachineBasicBlock *BB,
  DebugLoc dl = MI->getDebugLoc();
  MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(Opc));
  unsigned NumArgs = MI->getNumOperands() - 1;
  for (unsigned i = 0; i < NumArgs; ++i) {
    MachineOperand &Op = MI->getOperand(i+1);
  unsigned NumArgs = MI->getNumOperands();
  for (unsigned i = 1; i < NumArgs; ++i) {
    MachineOperand &Op = MI->getOperand(i);
    if (!(Op.isReg() && Op.isImplicit()))
      MIB.addOperand(Op);
  }
@@ -12895,9 +12895,9 @@ static MachineBasicBlock *EmitPCMPSTRI(MachineInstr *MI, MachineBasicBlock *BB,
  DebugLoc dl = MI->getDebugLoc();
  MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(Opc));
  unsigned NumArgs = MI->getNumOperands() - 1; // remove the results
  for (unsigned i = 0; i < NumArgs; ++i) {
    MachineOperand &Op = MI->getOperand(i+1);
  unsigned NumArgs = MI->getNumOperands(); // remove the results
  for (unsigned i = 1; i < NumArgs; ++i) {
    MachineOperand &Op = MI->getOperand(i);
    if (!(Op.isReg() && Op.isImplicit()))
      MIB.addOperand(Op);
  }