From: Chad Rosier Date: Wed, 30 Sep 2015 16:50:41 +0000 (+0000) Subject: [AArch64] Use helper function to improve readability. NFC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d97e13c17a56dd9d7157e9fa1d31af60fbfdd58a;p=oota-llvm.git [AArch64] Use helper function to improve readability. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248914 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp b/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp index 87e6d0fffb1..1e73328d3a2 100644 --- a/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp +++ b/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp @@ -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]