[PATCH] D119623: [SLP] Simplify indices processing for insertelements
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 13 16:20:46 PST 2022
ABataev added a comment.
Would be good to test it using test suite at least, just in case we missed something.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4026
SourceVectors.insert(cast<Instruction>(V)->getOperand(0));
- Optional<int> Idx = *getInsertIndex(V);
- if (!Idx || *Idx == UndefMaskElem)
- continue;
- MinIdx = std::min(MinIdx, *Idx);
+ if (getInsertIndex(V) == None) {
+ LLVM_DEBUG(dbgs() << "SLP: Gather of insertelement vectors with "
----------------
With an early check for insertelements in tryVectorizePair this can be turned to an assert rather than check and schedule cancellation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119623/new/
https://reviews.llvm.org/D119623
More information about the llvm-commits
mailing list