[PATCH] D43339: [SLP] Vectorize reversed stores.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 02:49:48 PDT 2019


RKSimon added a comment.

couple of minors



================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2668
     case Instruction::Store: {
-      // Check if the stores are consecutive or if we need to swizzle them.
-      for (unsigned i = 0, e = VL.size() - 1; i < e; ++i)
-        if (!isConsecutiveAccess(VL[i], VL[i + 1], *DL, *SE)) {
+      // Check if the stores are consecutive or of we need to swizzle them.
+      llvm::Type *ScalarTy = cast<StoreInst>(VL0)->getValueOperand()->getType();
----------------
or if we need to swizzle them.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2721
+            auto I = NumOpsWantToKeepOrder.try_emplace(CurrentOrder).first;
+            ++I->getSecond();
+            TreeEntry *TE =
----------------
Add brackets to make what you're incrementing more obvious?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D43339/new/

https://reviews.llvm.org/D43339





More information about the llvm-commits mailing list