[PATCH] D128665: [AArch64] Make nxv1i1 types a legal type for SVE.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 01:55:02 PDT 2022
sdesmalen added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:6664-6667
+ unsigned InNumElts = InVT.getVectorMinNumElements();
+ unsigned WidenNumElts = NVT.getVectorMinNumElements();
if (WidenNumElts > InNumElts && WidenNumElts % InNumElts == 0) {
unsigned NumConcat = WidenNumElts / InNumElts;
----------------
paulwalker-arm wrote:
> A few weeks back I extended TypeSize.h to include methods that allow us to handle such cases without resorting to `getVectorMinNumElements()`. See `hasKnownScalarFactor` and `getKnownScalarFactor`. The `>` code can use `NVT.bitsGT(InVT)`.
Thanks for pointing me to those interfaces, I missed that patch while I was OoO.
For the comparison, I believe that I can remove it entirely because X % Y where Y > X is always X and thus never 0.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:10484
+ if (VT == MVT::nxv1i1)
+ return getPUNPKLO(DAG, DL,
+ DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, MVT::nxv2i1, ID,
----------------
paulwalker-arm wrote:
> Rather than using `PUNPKLO` directly can you use `ISD::EXTRACT_SUBVECTOR`?
Good point!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128665/new/
https://reviews.llvm.org/D128665
More information about the llvm-commits
mailing list