[PATCH] D144670: [AArch64][GlobalISel] Legalize G_SHUFFLE_VECTOR with smaller dest size
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 23 13:10:28 PST 2023
paquette added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4993
- // TODO: Normalize the shuffle vector since mask and vector length don't
- // match.
- if (MaskNumElts <= SrcNumElts) {
+ if (MaskNumElts == SrcNumElts) {
return LegalizerHelper::LegalizeResult::UnableToLegalize;
----------------
Add a TODO?
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4999
+ // undef values.
+ SmallVector<int, 8> NewMask(Mask);
+ for (unsigned I = MaskNumElts; I < SrcNumElts; ++I) {
----------------
Why 8 vs default value for `SmallVector`?
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:5000
+ SmallVector<int, 8> NewMask(Mask);
+ for (unsigned I = MaskNumElts; I < SrcNumElts; ++I) {
+ NewMask.push_back(-1);
----------------
don't need braces
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144670/new/
https://reviews.llvm.org/D144670
More information about the llvm-commits
mailing list