[llvm-branch-commits] [llvm] [LV] Add ExtNegatedMulAccReduction expression type (PR #160154)

Sander de Smalen via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 26 09:09:44 PDT 2025


================
@@ -3524,7 +3524,13 @@ tryToMatchAndCreateMulAccumulateReduction(VPReductionRecipe *Red,
   };
 
   VPValue *VecOp = Red->getVecOp();
+  VPValue *Sub = nullptr;
   VPValue *A, *B;
+  // Sub reductions could have a sub between the add reduction and vec op.
+  if (match(VecOp, m_Binary<Instruction::Sub>(m_SpecificInt(0), m_VPValue()))) {
----------------
sdesmalen-arm wrote:

just a minor nit: is it worth creating a `VPValue *Tmp`, and matching `m_VPValue(Tmp)`, and then doing `VecOp = Tmp;` rather than getting operand 1 from the defining recipe?

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


More information about the llvm-branch-commits mailing list