[PATCH] D132590: [SLP] Try to match reductions first in a vector build sequence.

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 12:31:41 PDT 2022


vdmitrie added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:11820-11823
+  SmallVector<WeakTrackingVH> PostponedInsts;
+  for (Value *Op : BuildVectorOpds)
+    OpsChanged |=
+        vectorizeHorReduction(nullptr, Op, BB, R, TTI, PostponedInsts);
----------------
ABataev wrote:
> Why do you want still call this after `findBuildAggregate`?
In order to match hor reduction on build vector operands. Can you offer other approach to do the same?


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/redux-feed-buildvector.ll:117
+
+; In this test reduction feeds single insertelement instruction
+define void @rdx_feeds_single_insert(<2 x double> %v, double* nocapture readonly %arg, double* nocapture readonly %arg1, double* nocapture %arg2) {
----------------
ABataev wrote:
> Please, precommit the test
The vectorizer does not change its behavior on this test with the patch . I can commit it separately if you want but that won't be a pre-commit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132590



More information about the llvm-commits mailing list