[PATCH] D100486: [COST]Improve cost model for shuffles in SLP.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 15 04:39:14 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3620-3621
+            TargetTransformInfo::SK_PermuteSingleSrc;
+        if (ShuffleVectorInst::isReverseMask(NewMask))
+          SK = TargetTransformInfo::SK_Reverse;
+        CommonCost = TTI->getShuffleCost(SK, VecTy, NewMask);
----------------
sdesmalen wrote:
> Can the finding of a more specific ShuffleKind be done by getShuffleCost when a Mask is given?
> It seems a bit inconvenient to have to do that manually before calling this function.
I made a similar comment on D100495 - we could do with a generic 'ShuffleKind' decoder helper function (e.g. in Analysis\VectorUtils.h) that everybody can use.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100486



More information about the llvm-commits mailing list