[llvm] [LV] Create in-loop sub reductions (PR #147026)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 16 02:21:05 PDT 2025


fhahn wrote:

> The first of these appears to hit the assert about differences in the cost model. https://godbolt.org/z/GraEdK6Er The second I'm not sure is gaining anything from performing the sub reducion in-loop with an extra vneg. It is more instructions in the loop, that is probably slower. It doesn't try to create an extending reduction though in this case, so isn't getting that wrong.

Yep, the new created instruction shouldn't take `CurrentLinkI` as underlying instruction, as it means we may add incorrect flags + introducing a cost difference

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


More information about the llvm-commits mailing list