[PATCH] D127073: [SLP] Treat undef as any other constant
Harald van Dijk via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 5 08:05:40 PDT 2022
hvdijk added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7598
if (isConstant(V)) {
ReuseShuffleIndicies.emplace_back(UniqueValues.size());
UniqueValues.emplace_back(V);
----------------
ABataev wrote:
> For undefs need to push `UndefMaskElem`:
> ```
> ReuseShuffleIndicies.emplace_back(isa<UndefValue>(V) ? UndefMaskElem : UniqueValues.size());
> ```
I commented in D126939 that if we use UndefMaskElem when we want undef results, we run into another issue later on where we mistakenly treat a shuffle mask as an identity mask and remove the shuffle.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127073/new/
https://reviews.llvm.org/D127073
More information about the llvm-commits
mailing list