[llvm] r248914 - [AArch64] Use helper function to improve readability. NFC.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 09:50:41 PDT 2015
Author: mcrosier
Date: Wed Sep 30 11:50:41 2015
New Revision: 248914
URL: http://llvm.org/viewvc/llvm-project?rev=248914&view=rev
Log:
[AArch64] Use helper function to improve readability. NFC.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp?rev=248914&r1=248913&r2=248914&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp Wed Sep 30 11:50:41 2015
@@ -1185,8 +1185,7 @@ bool AArch64LoadStoreOpt::optimizeBlock(
// 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]
More information about the llvm-commits
mailing list