[PATCH] D126255: [SVE] Remove custom lowering of scalable vector MGATHER & MSCATTER operations.

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 03:08:16 PDT 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:552-557
+def SDT_SVEMaskedScatter : SDTypeProfile<0, 4, [
+  SDTCisVec<0>, SDTCisVec<1>, SDTCisPtrTy<2>, SDTCisVec<3>,
+  SDTCVecEltisVT<1, i1>, SDTCisSameNumEltsAs<0, 1>, SDTCisSameNumEltsAs<0, 3>
+]>;
+def sve_masked_scatter : SDNode<"ISD::MSCATTER", SDT_SVEMaskedScatter,
+                                  [SDNPHasChain, SDNPMayStore, SDNPMemOperand]>;
----------------
sdesmalen wrote:
> I don't think there's anything SVE specific about these nodes or the corresponding PatFrags. Can you make this a generic node in `include/llvm/Target/TargetSelectionDAG.td`  and possibly move the PatFrags as well? (same question for gather)
It's the `SDTCVecEltisVT<1, i1>` part that make theses target specific because not all targets have predicate vectors and thus can represent the mask as an ordinary integer vector. That said, looking at `masked_ld` I can see they just omit element parsing for that parameter so I can do likewise.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126255



More information about the llvm-commits mailing list