[llvm] Add LoopVectorizer support for `llvm.vector.partial.reduce.fadd` (PR #163975)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 03:11:39 PST 2025
================
@@ -2827,7 +2827,9 @@ InstructionCost VPExpressionRecipe::computeCost(ElementCount VF,
TargetTransformInfo::getPartialReductionExtendKind(
ExtR->getOpcode()),
TargetTransformInfo::PR_None, std::nullopt, Ctx.CostKind,
- std::nullopt)
+ RedTy->isFloatingPointTy()
+ ? std::optional{ExtR->getFastMathFlags()}
+ : std::nullopt)
----------------
sdesmalen-arm wrote:
My comment on passing fast-math flags here was actually related to my other comment on handling the simple `reduce.fadd(fpext(..)) `, so this change can be moved to the follow-up patch as well.
https://github.com/llvm/llvm-project/pull/163975
More information about the llvm-commits
mailing list