[AArch64] Use helper function to improve readability. NFC.

llvm-svn: 248914
This commit is contained in:
Chad Rosier 2015-09-30 16:50:41 +00:00
parent 71ee17fea4
commit 6c3b87438e

View File

@ -1185,8 +1185,7 @@ bool AArch64LoadStoreOpt::optimizeBlock(MachineBasicBlock &MBB) {
// 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]