[PATCH] D102828: [GlobalISel] Implement splitting of G_SHUFFLE_VECTOR.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 18:53:06 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4231
+  // Further legalization attempts will be needed to do split further.
+  NarrowTy = DstTy.changeNumElements(DstTy.getNumElements() / 2);
+  unsigned NewElts = NarrowTy.getNumElements();
----------------
aemerson wrote:
> arsenm wrote:
> > aemerson wrote:
> > > arsenm wrote:
> > > > I don't like simply discarding NarrowTy. It would be better to compute the type you do handle, and fail if it doesn't match the requested type
> > > But if you do that, fewerElements isn't going to know which narrow type it supports. Legalizing <16 x s64> is going to use a narrow ty of <2 x s64> with the rules as they're written now.
> > I don't follow, the parameter tells you which type to use
> For AArch64, if you have an oversize shuffle like `<8 x s64>`, fewerElementsVector is called with NarrowTy set to `<2 x s64>` since that's the type that we support. We can't just error out if in that case since this can be legalized, it just needs to the fewerElementsVector action to be done multiple times until we reach <2 x s64>.
The API suggests this should make the full transform all the way to <2 x s64> pieces in one shot


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102828



More information about the llvm-commits mailing list