const MCInstrDesc &Desc = MI->getDesc();
unsigned Class = Desc.getSchedClass();
- int ItinUOps = ItinData->Itineraries[Class].NumMicroOps;
- if (ItinUOps >= 0)
- return ItinUOps;
+ unsigned UOps = ItinData->Itineraries[Class].NumMicroOps;
+ if (UOps)
+ return UOps;
unsigned Opc = MI->getOpcode();
switch (Opc) {
return 2;
// 4 registers would be issued: 2, 2.
// 5 registers would be issued: 2, 2, 1.
- int A8UOps = (NumRegs / 2);
+ UOps = (NumRegs / 2);
if (NumRegs % 2)
- ++A8UOps;
- return A8UOps;
+ ++UOps;
+ return UOps;
} else if (Subtarget.isCortexA9()) {
- int A9UOps = (NumRegs / 2);
+ UOps = (NumRegs / 2);
// If there are odd number of registers or if it's not 64-bit aligned,
// then it takes an extra AGU (Address Generation Unit) cycle.
if ((NumRegs % 2) ||
!MI->hasOneMemOperand() ||
(*MI->memoperands_begin())->getAlignment() < 8)
- ++A9UOps;
- return A9UOps;
+ ++UOps;
+ return UOps;
} else {
// Assume the worst.
return NumRegs;