summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2015-09-30 16:50:41 +0000
committerChad Rosier <mcrosier@codeaurora.org>2015-09-30 16:50:41 +0000
commit4f04e2ec8747005777786910fe857834d61f64c2 (patch)
tree6ece9051bd50479897f69a884c0f7ccefaf20e39 /llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
parent0594e2a1e94800dd74c9f12ef3af88c7cb87a10b (diff)
downloadbcm5719-llvm-4f04e2ec8747005777786910fe857834d61f64c2.tar.gz
bcm5719-llvm-4f04e2ec8747005777786910fe857834d61f64c2.zip
[AArch64] Use helper function to improve readability. NFC.
llvm-svn: 248914
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
index 87e6d0fffb1..1e73328d3a2 100644
--- a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
+++ b/llvm/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]
OpenPOWER on IntegriCloud