[llvm] [SelectionDAG] Add PARTIAL_REDUCE_U/SMLA ISD Nodes (PR #125207)

James Chesterman via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 09:10:28 PST 2025


================
@@ -22010,8 +22019,11 @@ static SDValue performIntrinsicCombine(SDNode *N,
       return Dot;
     if (SDValue WideAdd = tryLowerPartialReductionToWideAdd(N, Subtarget, DAG))
       return WideAdd;
-    return DAG.getPartialReduceAdd(SDLoc(N), N->getValueType(0),
-                                   N->getOperand(1), N->getOperand(2));
+    SDLoc DL(N);
+    SDValue Input = N->getOperand(2);
+    return DAG.getNode(ISD::PARTIAL_REDUCE_UMLA, DL, N->getValueType(0),
+                       N->getOperand(1), Input,
+                       DAG.getConstant(1, DL, Input.getValueType()));
----------------
JamesChesterman wrote:

I've kept this the same in the end, just because the `DL` and `Input` are used in the `DAG.getConstant` call within this too, unless there's something I'm missing?

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


More information about the llvm-commits mailing list