git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248914
91177308-0d34-0410-b5e6-
96231b3b80d8
// The immediate in the load/store is scaled by the size of the register
// being loaded. The immediate in the add we're looking for,
// however, is not, so adjust here.
- int Value =
- MI->getOperand(isPairedLdSt(MI) ? 3 : 2).getImm() * getMemScale(MI);
+ int Value = getLdStOffsetOp(MI).getImm() * getMemScale(MI);
// Look forward to try to find a post-index instruction. For example,
// ldr x1, [x0, #64]