[PATCH] D100865: [COST] Improve shuffle kind detection if shuffle mask is provided.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 25 13:08:14 PDT 2021
ABataev added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:753
+ case TTI::SK_PermuteTwoSrc:
+ if (ShuffleVectorInst::isSelectMask(Mask))
+ return TTI::SK_Select;
----------------
dmgreen wrote:
> 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
This function does not use 2 different length, it has just one, deduced out of Mask size. It is just impossible to have a `change of size` situation here, I assume. We do not work with actual shuffles, functions are static.
Also, could you provide more details about your example? What shall I expect as a result!
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