[llvm] r259052 - [AArch64] Set MMOs on pre- and post-index instructions.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 07:38:24 PST 2016


Author: mcrosier
Date: Thu Jan 28 09:38:24 2016
New Revision: 259052

URL: http://llvm.org/viewvc/llvm-project?rev=259052&view=rev
Log:
[AArch64] Set MMOs on pre- and post-index instructions.

Without the MMOs the MI scheduler is unable to reason about the dependencies of
these instructions.

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp

Modified: llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp?rev=259052&r1=259051&r2=259052&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp Thu Jan 28 09:38:24 2016
@@ -1264,7 +1264,8 @@ AArch64LoadStoreOpt::mergeUpdateInsn(Mac
               .addOperand(getLdStRegOp(Update))
               .addOperand(getLdStRegOp(I))
               .addOperand(getLdStBaseOp(I))
-              .addImm(Value);
+              .addImm(Value)
+              .setMemRefs(I->memoperands_begin(), I->memoperands_end());
   } else {
     // Paired instruction.
     int Scale = getMemScale(I);
@@ -1273,7 +1274,8 @@ AArch64LoadStoreOpt::mergeUpdateInsn(Mac
               .addOperand(getLdStRegOp(I, 0))
               .addOperand(getLdStRegOp(I, 1))
               .addOperand(getLdStBaseOp(I))
-              .addImm(Value / Scale);
+              .addImm(Value / Scale)
+              .setMemRefs(I->memoperands_begin(), I->memoperands_end());
   }
   (void)MIB;
 




More information about the llvm-commits mailing list