[PATCH] D131875: [AArch64][SVE] Add hadd and rhadd support

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 02:15:05 PST 2022


paulwalker-arm accepted this revision.
paulwalker-arm added a comment.
This revision is now accepted and ready to land.

Small code placement issue but otherwise looks good.



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:1272-1279
+      if (Subtarget->hasSVE2()) {
+        for (auto VT : {MVT::nxv16i8, MVT::nxv8i16, MVT::nxv4i32, MVT::nxv2i64}) {
+          setOperationAction(ISD::AVGFLOORS, VT, Custom);
+          setOperationAction(ISD::AVGFLOORU, VT, Custom);
+          setOperationAction(ISD::AVGCEILS, VT, Custom);
+          setOperationAction(ISD::AVGCEILU, VT, Custom);
+        }
----------------
I suspect you didn't mean to put this within the `{MVT::nxv16i1, MVT::nxv8i1...` loop? Perhaps it's worth placing within the existing loop for `{MVT::nxv16i8, MVT::nxv8i16, MVT::nxv4i32, MVT::nxv2i64}` and protecting with `hasSVE2` there?


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

https://reviews.llvm.org/D131875



More information about the llvm-commits mailing list