[llvm] [LSR] Only apply postincrement discount on address uses (PR #149341)

John Brawn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 07:26:59 PDT 2026


john-brawn-arm wrote:

Reviving this PR. Running a bunch of embedded benchmarks on cortex-m85 the impact of this PR is essentially zero, so it looks like the worse codegen seen in https://github.com/llvm/llvm-project/pull/149341#discussion_r2213749285 isn't something that has any real-world impact.

As to why I'm reviving this PR if it's impact is zero, that's because I'm looking at changing the preferred addressing mode on AArch64 to All (from None), and this problem with the postincrement discount being applied to things that can't be postincremented affects llvm-test-suite/MicroBenchmarks/LoopVectorization/EarlyExit.cpp on AArch64 with ``-mllvm -lsr-preferred-addressing-mode=all``.

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


More information about the llvm-commits mailing list