[llvm] [AArch64][SVE] Add codegen support for partial reduction lowering to wide add instructions (PR #114406)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 07:45:34 PDT 2024
================
@@ -21783,6 +21784,62 @@ SDValue tryLowerPartialReductionToDot(SDNode *N,
return DAG.getNode(Opcode, DL, ReducedType, NarrowOp, A, B);
}
+SDValue tryLowerPartialReductionToWideAdd(SDNode *N,
+ const AArch64Subtarget *Subtarget,
+ SelectionDAG &DAG) {
+
+ assert(N->getOpcode() == ISD::INTRINSIC_WO_CHAIN &&
+ getIntrinsicID(N) ==
+ Intrinsic::experimental_vector_partial_reduce_add &&
+ "Expected a partial reduction node");
+
+ bool Scalable = N->getValueType(0).isScalableVector();
+ if (Scalable && !Subtarget->isSVEorStreamingSVEAvailable())
----------------
huntergr-arm wrote:
Based on the intrinsics you're lowering to below, I think you need to bail if SVE isn't available regardless. There are similar instructions for NEON but they aren't matched here.
https://github.com/llvm/llvm-project/pull/114406
More information about the llvm-commits
mailing list