[PATCH] D119623: [SLP] Simplify indices processing for insertelements

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 03:15:57 PST 2022


ABataev added inline comments.


================
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 "
----------------
anton-afanasyev wrote:
> ABataev wrote:
> > With an early check for insertelements in tryVectorizePair this can be turned to an assert rather than check and schedule cancellation.
> Yes, done in D119679
Update this patch after D119679


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