[PATCH] D125111: [SLP] Make reordering aware of external vectorizable scalar stores.

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 6 18:28:44 PDT 2022


vdmitrie added a comment.

I'm also observing  a stability issue. I'll submit a test case once  reduce it.



================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3589
+      if (!OpTE->ExternalUserReorderIndices.empty()) {
+        for (const OrdersType &Order : OpTE->ExternalUserReorderIndices)
+          ++OrdersUses.insert(std::make_pair(Order, 0)).first->second;
----------------
vdmitrie wrote:
> nit: name Order is already used by lambda above.
> nit: name Order is already used by lambda above.
just to correct myself: not lambda but by the result of the lambda call ( I first overlooked it is a call).
Anyway, Order in this  loop hides Order from line  3582


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4131
+    for (StoreInst *SI : StoresVec) {
+      unsigned Idx = llvm::find(StoresVecSorted, SI) - StoresVecSorted.begin();
+      ReorderIndices.push_back(Idx);
----------------
std::distance(StoresVecSorted.begin(), find(StoresVecSorted, SI));


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125111



More information about the llvm-commits mailing list