[PATCH] D116362: [TTI] Support ScalableVectorType in getShuffleCost with SK_Broadcast kind

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 30 06:17:19 PST 2021


spatel added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:876
 
     switch (improveShuffleKindFromMask(Kind, Mask)) {
     case TTI::SK_Broadcast:
----------------
junparser wrote:
> junparser wrote:
> > spatel wrote:
> > > Can we assert that the Type is Fixed unless the shuffle is a broadcast?
> > >   assert((ImprovedKind == TTI::SK_Broadcast || isa<FixedVectorType>(Tp)) && "Unexpected shuffle of scalable vector");
> > yes,we can.
> hmm, we cannot assert here, SK_ExtractSubvector and such kind handle scalable vector as well.
But we are casting to fixed vector type in the case statements below here - if scalable type is possible, then it will crash? Do you have an example of a scalable vector with any of the other shuffle kinds?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116362



More information about the llvm-commits mailing list