[llvm] [AArch64] Higher cost for partial reductions if it can't use dot/mlalb/t (PR #191369)

David Green via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 02:49:12 PDT 2026


https://github.com/davemgreen commented:

This doesn't sound like how this _should_ work. The cost of the normal loop and a partial reduction should be compared and the partial reduction should only be chosen if the cost is lower. Otherwise I believe it will just lead to less ILP in the loop.

Should this condition in IsProfitablePartialReductionChainForVF be <, not <=:
https://github.com/llvm/llvm-project/blob/df6c82053c5e1f9814d130d423f34871bc6423c5/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp#L6435

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


More information about the llvm-commits mailing list