[PATCH] D28251: [AArch64] Fix over-eager early-exit in load-store combiner
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 10:07:38 PST 2017
junbuml added inline comments.
================
Comment at: lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:1473-1474
int OffsetStride = IsUnscaled ? getMemScale(MI) : 1;
+ if (Offset > 0)
+ Offset -= OffsetStride;
if (!inBoundsForPair(IsUnscaled, Offset, OffsetStride))
----------------
In which case, can you see better st/ld pairs with this change ? Can you add a case if you have? Also, is there a case on which this change cause worse combinations of st/ld pairs?
In some case, this change may unnecessarily call findMatchingInsn() :
e.g.,
STR %XZR, %X0, 64 <--- we don't even need to try to look up pair for this
STR %XZR, %X0, 65
================
Comment at: test/CodeGen/AArch64/ldst-opt.ll:1418-1421
+; CHECKCOMBINE: // %entry
+; CHECKCOMBINE-NEXT: stp xzr, xzr, [x0]
+; CHECKCOMBINE-NEXT: stp xzr, xzr, [x0, #16]
+; CHECKCOMBINE-NEXT: ret
----------------
For me, this doesn't seem to be related with your change in AArch64LoadStoreOptimizer.cpp
https://reviews.llvm.org/D28251
More information about the llvm-commits
mailing list