[llvm] Add LoopVectorizer support for `llvm.vector.partial.reduce.fadd` (PR #163975)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 09:03:34 PST 2026


================
@@ -4158,6 +4170,26 @@ tryToMatchAndCreateMulAccumulateReduction(VPReductionRecipe *Red,
   VPRecipeBase *Sub = nullptr;
   VPValue *A, *B;
   VPValue *Tmp = nullptr;
+
+  // Try to match reduce.fadd(fmul(...)).
+  if (match(VecOp, m_FMul(m_VPValue(A), m_VPValue(B)))) {
----------------
fhahn wrote:

clearer to match the full expression at the outset?

```suggestion
  if (match(VecOp, m_FMul(m_FPExt(m_VPValue()), m_FPExt (m_VPValue()))) {
```

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


More information about the llvm-commits mailing list