return (isSub && Offset.getReg() != 0);
}
-bool ARMBaseInstrInfo::isLdstScaledReg(const MachineInstr &MI,
- unsigned Op) const {
- const MachineOperand &Opc = MI.getOperand(Op + 2);
- unsigned OffImm = Opc.getImm();
- return ARM_AM::getAM2ShiftOpc(OffImm) != ARM_AM::no_shift;
-}
-
// Load, scaled register offset, not plus LSL2
bool ARMBaseInstrInfo::isLdstScaledRegNotPlusLsl2(const MachineInstr &MI,
unsigned Op) const {
static bool isCPSRDefined(const MachineInstr &MI);
bool isAddrMode3OpMinusReg(const MachineInstr &MI, unsigned Op) const;
- // Load, scaled register offset
- bool isLdstScaledReg(const MachineInstr &MI, unsigned Op) const;
// Load, scaled register offset, not plus LSL2
bool isLdstScaledRegNotPlusLsl2(const MachineInstr &MI, unsigned Op) const;
// Minus reg for ldstso addr mode
def IsLdstsoScaledNotOptimalPredX2 :
SchedPredicate<[{TII->isLdstScaledRegNotPlusLsl2(*MI, 2)}]>;
-// Load, scaled register offset
-def IsLdstsoScaledPred :
- SchedPredicate<[{TII->isLdstScaledReg(*MI, 1)}]>;
-def IsLdstsoScaledPredX2 :
- SchedPredicate<[{TII->isLdstScaledReg(*MI, 2)}]>;
+def IsLdstsoScaledPredX2 : MCSchedPredicate<CheckNot<CheckExtNoShift>>;
def IsLdstsoMinusRegPredX0 :
SchedPredicate<[{TII->isLdstSoMinusReg(*MI, 0)}]>;
# CHECK-NEXT: 1 1 1.00 * str r9, [r6, r3]
# CHECK-NEXT: 1 1 1.00 * str r8, [r0, -r2]
# CHECK-NEXT: 2 1 1.00 * str r7, [r1, r6]!
-# CHECK-NEXT: 2 1 1.00 * str r7, [r1, r6, lsl #2]!
+# CHECK-NEXT: 2 2 1.00 * str r7, [r1, r6, lsl #2]!
# CHECK-NEXT: 2 1 1.00 * str r6, [sp, -r1]!
# CHECK-NEXT: 2 2 1.00 * str r5, [r3], r9
# CHECK-NEXT: 2 2 1.00 * str r4, [r2], -r5
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1.0] [1.1] [2] [3] [4] [5] [6]
-# CHECK-NEXT: - 44.50 44.50 284.00 8.00 55.00 - -
+# CHECK-NEXT: - 44.00 44.00 284.00 9.00 55.00 - -
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1.0] [1.1] [2] [3] [4] [5] [6] Instructions:
# CHECK-NEXT: - - - - - 1.00 - - str r9, [r6, r3]
# CHECK-NEXT: - - - - - 1.00 - - str r8, [r0, -r2]
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - str r7, [r1, r6]!
-# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - str r7, [r1, r6, lsl #2]!
+# CHECK-NEXT: - - - - 1.00 1.00 - - str r7, [r1, r6, lsl #2]!
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - str r6, [sp, -r1]!
# CHECK-NEXT: - - - - 1.00 1.00 - - str r5, [r3], r9
# CHECK-NEXT: - - - - 1.00 1.00 - - str r4, [r2], -r5