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

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 3 01:16:13 PST 2025


================
@@ -8301,6 +8302,9 @@ VPRecipeBuilder::tryToCreatePartialReduction(VPInstruction *Reduction,
          "all accumulators in chain must have same scale factor");
 
   auto *ReductionI = Reduction->getUnderlyingInstr();
+  if (Reduction->getOpcode() == Instruction::FAdd &&
+      !ReductionI->hasAllowReassoc())
+    return nullptr;
----------------
gbossu wrote:

Out of curiosity: Is `contract` implied by fast-math?

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


More information about the llvm-commits mailing list