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

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 09:14:28 PST 2023


ABataev added inline comments.


================
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));
----------------
vdmitrie wrote:
> What is a case when count(VL, *It) == 1?
It's when you have something like `<poison, poison, v, poison>`.


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