[PATCH] D98714: [SLP] Add insertelement instructions to vectorizable tree

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 12 04:45:06 PDT 2021


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3819
+      unsigned const Offset = *getInsertIndex(VL[0], 0);
+      if (Offset % NumScalars)
+        Cost += TTI->getShuffleCost(
----------------
anton-afanasyev wrote:
> ABataev wrote:
> > I think need to check that `NumElts != NumScalars`
> I've removed this check since `Offset % NumScalars != 0` implies `NumElts != NumScalars`. Do you think we need check for readability?
I would add this check just in case


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98714/new/

https://reviews.llvm.org/D98714



More information about the llvm-commits mailing list