[PATCH] D12116: [AArch64] Improve load/store optimizer to handle LDUR + LDR.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 08:36:08 PDT 2015

mcrosier added inline comments.

Comment at: lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:721
@@ -619,4 +720,3 @@
         // is out of range for a pairwise instruction, bail and keep looking.
-        bool MIIsUnscaled = isUnscaledLdSt(MI);
-        if (!inBoundsForPair(MIIsUnscaled, MinOffset, OffsetStride)) {
+        if (!inBoundsForPair(IsUnscaled, MinOffset, OffsetStride)) {
           trackRegDefsUses(MI, ModifiedRegs, UsedRegs, TRI);
ab wrote:
> To make sure I understand: the previous code was "incorrect" in checking MI rather than FirstMI, but it didn't make a difference because we didn't allow mismatched opcodes, right?
I'm not sure the checking was "incorrect", but your latter comment is correct; because we didn't allow mismatches opcodes it didn't make a difference.  However, because we're converting MI to be either Scaled or Unscaled to match FirstMI, we need to use IsUscaled in the context of this patch.



More information about the llvm-commits mailing list