[llvm] [DAGCombiner] Add generic DAG combine for ISD::PARTIAL_REDUCE_MLA (PR #127083)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 05:59:33 PST 2025


================
@@ -836,9 +836,8 @@ void TargetLoweringBase::initActions() {
     setOperationAction(ISD::SET_FPENV, VT, Expand);
     setOperationAction(ISD::RESET_FPENV, VT, Expand);
 
-    // PartialReduceMLA operations default to expand.
-    setOperationAction({ISD::PARTIAL_REDUCE_UMLA, ISD::PARTIAL_REDUCE_SMLA}, VT,
-                       Expand);
+    for (MVT InputVT : MVT::all_valuetypes())
+      setPartialReduceMLAAction(VT, InputVT, Expand);
----------------
MacDue wrote:

 Another option could be we accept the slight regression in this PR (enabling the DAG combine without the `!TLI.isPartialReduceMLALegalOrCustom(N->getValueType(0), MulOpLHSVT)` check), and fix it after the node lower has been added.

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


More information about the llvm-commits mailing list