[llvm] [AArch64][SVE] Add partial reduction SDNodes (PR #117185)
James Chesterman via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 02:14:48 PST 2024
================
@@ -462,6 +462,16 @@ class TargetLoweringBase {
return true;
}
+ /// Return true if there is a sign extend on the input to this function. Used
+ /// to determine whether to transform the
+ /// @llvm.experimental.vector.partial.reduce.* intrinsic to
+ /// PARTIAL_REDUCE_SADD or PARTIAL_REDUCE_UADD. It also removes the extend
+ /// from the input. \p Input The 'Input' operand to the
+ /// @llvm.experimental.vector.partial.reduce.* intrinsic.
+ virtual bool isPartialReductionInputSigned(SDValue &Input) const {
+ return false;
+ }
----------------
JamesChesterman wrote:
I just thought I'd do it this way in case other targets had a slightly different implementation of partial reductions? For example, originally I was also going to get it to remove the extends preceding dot products (before realising that I'd need more ISD nodes for sudot and usdot). But I thought I'd leave it like this in case other targets wanted to place other operations between the extend and the partial reduction?
https://github.com/llvm/llvm-project/pull/117185
More information about the llvm-commits
mailing list