[llvm] [X86] Add ISD::VECREDUCE_MUL lowering instead of matching in DAG (PR #207593)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 01:11:15 PDT 2026


================
@@ -47972,6 +47948,38 @@ static SDValue combineExtractVectorElt(SDNode *N, SelectionDAG &DAG,
   return SDValue();
 }
 
+static SDValue combineVECREDUCE_MUL(SDNode *N, SelectionDAG &DAG,
+                                    const X86Subtarget &Subtarget) {
+  SDValue Src = N->getOperand(0);
+  EVT SrcVT = Src.getValueType();
+  unsigned NumElts = SrcVT.getVectorNumElements();
+  SDLoc DL(N);
+
+  // vXi8 mul reduction - promote to vXi16 mul reduction.
----------------
RKSimon wrote:

Yes - vector-reduce-mul.ll has a full set of vXi8 reduction tests -  if you want I can split the patch into a commit series to show the regressions and fixes?

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


More information about the llvm-commits mailing list