[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 05:37:56 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();
----------------
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
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4234-4236
+ SmallVector<Register> SplitSrc1Regs, SplitSrc2Regs;
+ extractParts(Src1Reg, NarrowTy, 2, SplitSrc1Regs);
+ extractParts(Src2Reg, NarrowTy, 2, SplitSrc2Regs);
----------------
It should be relatively easy to use extractGCDType + buildLCMMergePieces to form a widened vector for the non-power-of-2 case
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