[llvm] [LV] Create in-loop sub reductions (PR #147026)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 14 10:02:35 PDT 2025
https://github.com/sdesmalen-arm approved this pull request.
LGTM with nit addressed.
@davemgreen wrote:
> Hi - Could this add a sub into the middle of an extending reduction?
>
> (It might be good to transform a sub reduction into a add reduction + negate at the end of the loop, to allow the more efficient sum reductions to trigger).
That's not a bad idea, although that might be better left for a future PR. The reason for this change is to align the implementations of partial and in-loop reductions. I'm also not entirely sure if we necessarily want to do this for partial reductions, because some of the `cdot` patterns rely on the input being negated inside the loop.
https://github.com/llvm/llvm-project/pull/147026
More information about the llvm-commits
mailing list