[PATCH] D100865: [COST] Improve shuffle kind detection if shuffle mask is provided.
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 25 13:00:28 PDT 2021
dmgreen added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:753
+ case TTI::SK_PermuteTwoSrc:
+ if (ShuffleVectorInst::isSelectMask(Mask))
+ return TTI::SK_Select;
----------------
ABataev wrote:
> dmgreen wrote:
> > Some of these Mask functions do not handle all sizes of mask. Do we need to be careful about shuffles that changesLength?
> Here we don't have info about length changes, looks like all these functions use the size of the Mask array as vector factor.
I may have the wrong impression of what is going on exactly, but I think it's about the elements being out of range for the mask size.
(Hopefully) Try this example:
https://godbolt.org/z/WWrPbPxcW
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100865/new/
https://reviews.llvm.org/D100865
More information about the llvm-commits
mailing list