[PATCH] D17097: [AArch64] add mem ref to unscaled pairs

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 14:06:32 PST 2016


sebpop created this revision.
sebpop added reviewers: rengolin, kristof.beyls.
sebpop added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.

This matches the code used to create mem refs for scaled pairs.
We need this change to enable creation of more pairs: we used to return true
when checking for hasOrderedMemoryRef() in the check for alias analysis.

Patch by Sebastian Pop and Abderrazek Zaafrani.


http://reviews.llvm.org/D17097

Files:
  llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp

Index: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
+++ llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
@@ -795,7 +795,8 @@
               .addOperand(getLdStRegOp(RtMI))
               .addOperand(getLdStRegOp(Rt2MI))
               .addOperand(BaseRegOp)
-              .addImm(OffsetImm);
+              .addImm(OffsetImm)
+              .setMemRefs(I->mergeMemRefsWith(*Paired));
   }
 
   (void)MIB;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17097.47518.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160210/0868d218/attachment.bin>


More information about the llvm-commits mailing list