[llvm] [DAGCombiner] Add DAG combine for PARTIAL_REDUCE_MLA when no mul op (PR #131326)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri May 2 08:06:52 PDT 2025


================
@@ -12669,6 +12679,48 @@ SDValue DAGCombiner::visitPARTIAL_REDUCE_MLA(SDNode *N) {
                      RHSExtOp);
 }
 
+// Makes partial.reduce.umla(acc, zext(op1), splat(1)) into
+// partial.reduce.umla(acc, op, splat(trunc(1)))
+// Makes partial.reduce.smla(acc, sext(op1), splat(1)) into
+// partial.reduce.smla(acc, op, splat(trunc(1)))
+SDValue DAGCombiner::foldPartialReduceMLANoMulOp(SDNode *N) {
----------------
sdesmalen-arm wrote:

nit: maybe rename this to `foldPartialReduceAdd`?

https://github.com/llvm/llvm-project/pull/131326


More information about the llvm-commits mailing list