[llvm] [LV] Simplify the chain traversal in `getScaledReductions()` (NFCI) (PR #184830)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 9 03:44:44 PDT 2026


MacDue wrote:

> I think this is another case where there's different behavior to the existing code when there is some re-use between reduction chains: https://llvm.godbolt.org/z/q1b4no77M

It does not seem like it's the reuse that's the issue here, the old code actually skips checking the last operation in the chain which is `WIDEN ir<%sum1.next> = add ir<%accum>, ir<1>`, as the step before it is a partial reduction. This does not really seem that intentional behaviour. 

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


More information about the llvm-commits mailing list