[llvm-branch-commits] [llvm] [AArch64] Tweak the cost-model of partial reductions to mitigate regressions from #181706 (PR #181707)
Florian Hahn via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Feb 22 08:15:18 PST 2026
================
@@ -5915,7 +5915,7 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
// The sub/negation cannot be folded into the operands of
// ISD::PARTIAL_REDUCE_*MLA, so make the cost more expensive.
if (Opcode == Instruction::Sub)
- Cost += 8;
+ Cost *= 4;
----------------
fhahn wrote:
Why scale by 4 and by 8 below? We usually sink the sub, right?
https://github.com/llvm/llvm-project/pull/181707
More information about the llvm-branch-commits
mailing list