[PATCH] D144958: [SLP]Initial support for reshuffling of non-starting buildvector/gather nodes.

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 09:27:51 PST 2023


vdmitrie added a comment.

LG. Thanks.



================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6998
       bool NeedShuffle =
-          VL.front() != *It || !all_of(VL.drop_front(), UndefValue::classof);
+          count(VL, *It) > 1 &&
+          (VL.front() != *It || !all_of(VL.drop_front(), UndefValue::classof));
----------------
ABataev wrote:
> vdmitrie wrote:
> > What is a case when count(VL, *It) == 1?
> It's when you have something like `<poison, poison, v, poison>`.
Thanks. I see now. I did not realize that isSplat returns true for even single non-undef value in a vector.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144958



More information about the llvm-commits mailing list