[PATCH] D144958: [SLP]Initial support for reshuffling of non-starting buildvector/gather nodes.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 09:37:18 PST 2023
RKSimon 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:
> 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.
Yes - its a problem in both IR and DAG :(
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