summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2015-09-24 21:27:49 +0000
committerChad Rosier <mcrosier@codeaurora.org>2015-09-24 21:27:49 +0000
commitb02f5a5a1f9e4f2a6b29a9f162ce27183dcd63e9 (patch)
tree34df7eb46292bf4c4ff46809ff346065476b7539 /llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
parent7d0c7255c51084a2d1d48e0a51d38570905edcc5 (diff)
downloadbcm5719-llvm-b02f5a5a1f9e4f2a6b29a9f162ce27183dcd63e9.tar.gz
bcm5719-llvm-b02f5a5a1f9e4f2a6b29a9f162ce27183dcd63e9.zip
[AArch64] Improve the readability of the ld/st optimization pass. NFC.
In this context, MI is an add/sub instruction not a loads/store. llvm-svn: 248540
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
index d37751449cc..783a610ce0c 100644
--- a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
@@ -750,10 +750,10 @@ static bool isMatchingUpdateInsn(MachineInstr *MI, unsigned BaseReg,
break;
// If the instruction has the base register as source and dest and the
// immediate will fit in a signed 9-bit integer, then we have a match.
- if (getLdStRegOp(MI).getReg() == BaseReg &&
- getLdStBaseOp(MI).getReg() == BaseReg &&
- getLdStOffsetOp(MI).getImm() <= 255 &&
- getLdStOffsetOp(MI).getImm() >= -256) {
+ if (MI->getOperand(0).getReg() == BaseReg &&
+ MI->getOperand(1).getReg() == BaseReg &&
+ MI->getOperand(2).getImm() <= 255 &&
+ MI->getOperand(2).getImm() >= -256) {
// If we have a non-zero Offset, we check that it matches the amount
// we're adding to the register.
if (!Offset || Offset == MI->getOperand(2).getImm())
OpenPOWER on IntegriCloud