[PATCH] D14902: [AArch64] Promote loads from stored

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 14:28:30 PST 2015


junbuml marked 2 inline comments as done.

================
Comment at: lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:1057
@@ +1056,3 @@
+        isLdOffsetInRangeOfStored(FirstMI, MI) &&
+        !ModifiedRegs[getLdStRegOp(MI).getReg()]) {
+      Stored = MBBI;
----------------
mcrosier wrote:
> What if the store instruction modifies the base register (e.g., pre-/post-index)?  I'm guessing the isMatchingStore makes that check unnecessary because it doesn't check for pre-/post-index versions of the store.
Yes, you are right. pre-/post-index is not even considered, so BaseReg will not be modified by the store itself. Just in case, I added comment about it. 


http://reviews.llvm.org/D14902





More information about the llvm-commits mailing list