llvm.org GIT mirror llvm / 52ea245
Remove unnecessary subtraction and addition by 1 around a couple for loops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167673 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 7 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
1285712857 DebugLoc dl = MI->getDebugLoc();
1285812858 MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(Opc));
1285912859
12860 unsigned NumArgs = MI->getNumOperands() - 1;
12861 for (unsigned i = 0; i < NumArgs; ++i) {
12862 MachineOperand &Op = MI->getOperand(i+1);
12860 unsigned NumArgs = MI->getNumOperands();
12861 for (unsigned i = 1; i < NumArgs; ++i) {
12862 MachineOperand &Op = MI->getOperand(i);
1286312863 if (!(Op.isReg() && Op.isImplicit()))
1286412864 MIB.addOperand(Op);
1286512865 }
1289412894 DebugLoc dl = MI->getDebugLoc();
1289512895 MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(Opc));
1289612896
12897 unsigned NumArgs = MI->getNumOperands() - 1; // remove the results
12898 for (unsigned i = 0; i < NumArgs; ++i) {
12899 MachineOperand &Op = MI->getOperand(i+1);
12897 unsigned NumArgs = MI->getNumOperands(); // remove the results
12898 for (unsigned i = 1; i < NumArgs; ++i) {
12899 MachineOperand &Op = MI->getOperand(i);
1290012900 if (!(Op.isReg() && Op.isImplicit()))
1290112901 MIB.addOperand(Op);
1290212902 }