[AArch64] Reuse MayLoad. NFC.
authorChad Rosier <mcrosier@codeaurora.org>
Thu, 3 Sep 2015 14:19:43 +0000 (14:19 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Thu, 3 Sep 2015 14:19:43 +0000 (14:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246767 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp

index f7f3bfa75957330c98911d3e3bfa63c38496cade..83dd806421e6adbeb9099ede4fe6099c682069db 100644 (file)
@@ -657,7 +657,7 @@ AArch64LoadStoreOpt::findMatchingInsn(MachineBasicBlock::iterator I,
         // first and the second alias with the first, we can combine the first
         // into the second.
         if (!ModifiedRegs[getLdStRegOp(FirstMI).getReg()] &&
-            !(FirstMI->mayLoad() && UsedRegs[getLdStRegOp(FirstMI).getReg()]) &&
+            !(MayLoad && UsedRegs[getLdStRegOp(FirstMI).getReg()]) &&
             !mayAlias(FirstMI, MemInsns, TII)) {
           Flags.setMergeForward(true);
           return MBBI;