[llvm] Reland "Redesign Straight-Line Strength Reduction (SLSR) (#162930)" (PR #169614)
Fei Peng via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 26 15:59:08 PST 2025
fiigii wrote:
@dakersnar @Artem-B Thanks for reviewing. After this PR, the SLSR output will become more conservative for correctness, i.e., dropping more inbounds or nsw/nuw. I am concerned that the latter optimizations may be impacted. For example, in open source LLVM's NVPTX target, load-store-vectorization runs after SLSR. More conservative overflow annotations may hurt alias analysis and consecutive analysis (SCEV), and may prevent some vectorization that is one of the most improtant optimizations for GPU. I suggest you give it a try to run LSV a bit early, before SLSR.
Additionally, I believe this pass still has some correctness issues regarding integer overflow, which have existed before my redesign. I will open follow-up PRs to solve them, and we will see more conservative output (fewer inbounds!).
https://github.com/llvm/llvm-project/pull/169614
More information about the llvm-commits
mailing list