[llvm] [DAGcombine] Recognize fneg on RHS for partial_reduce_fmla (PR #193994)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 07:13:48 PDT 2026


================
@@ -13552,6 +13552,14 @@ SDValue DAGCombiner::foldPartialReduceMLAMulOp(SDNode *N) {
   SDValue LHS = Op1->getOperand(0);
   SDValue RHS = Op1->getOperand(1);
 
+  // After instcombine, negation for FP operations is on the RHS, so implement:
+  //   fmul(fpext(a), fneg(fpext(b)))
+  //-> fmul(fpext(a), fpext(fneg(b)))
+  if (sd_match(RHS, m_FNeg(m_Value(Tmp)))) {
----------------
arsenm wrote:

Just more missing support in more places 

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


More information about the llvm-commits mailing list