[llvm] [AArch64][SVE] Add partial reduction SDNodes (PR #117185)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 03:19:31 PST 2024
================
@@ -1839,8 +1841,17 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
setOperationAction(ISD::EXPERIMENTAL_VECTOR_HISTOGRAM, MVT::nxv2i64,
Custom);
}
+
+ for (auto VT : {MVT::nxv2i64, MVT::nxv4i32, MVT::nxv8i16}) {
+ setOperationAction(ISD::PARTIAL_REDUCE_UADD, VT, Custom);
+ setOperationAction(ISD::PARTIAL_REDUCE_SADD, VT, Custom);
+ }
}
+ for (auto VT : {MVT::v4i64, MVT::v4i32, MVT::v2i32}) {
+ setOperationAction(ISD::PARTIAL_REDUCE_UADD, VT, Custom);
+ setOperationAction(ISD::PARTIAL_REDUCE_SADD, VT, Custom);
+ }
----------------
MacDue wrote:
Which cases are these fixed-vector types supported? (Neon dot products?) Your custom lowering will probably need to check if the vectors are fixed/scalable as otherwise there may be cases it attempts to make fixed-size wide adds? E.g acc = v2i32, input = v4i32?
https://github.com/llvm/llvm-project/pull/117185
More information about the llvm-commits
mailing list