[llvm] [LoopReduceMotion] Improve loop by extract reduction instruction (PR #179215)

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 04:56:45 PST 2026


https://github.com/davemgreen commented:

I think this would be detrimental to any architectures that preferred inloop reductions or could perform the reduction as or more efficiently than the add. (I was trying to test it, but it crashed and looks like it is fairly limited to what it can transform at the moment).

This probably needs to be cost-modelled, although the cost-model can be difficult as there are so many operations potentially transformed into a single instruction.

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


More information about the llvm-commits mailing list