[llvm] [LSR] All known LCSSA fixes (PR #193824)
Vikram Hegde via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 02:35:33 PDT 2026
vikramRH wrote:
Another interesting thing is that I just read the following description in LoopPassManager.h
<img width="611" height="108" alt="image" src="https://github.com/user-attachments/assets/7ed78345-91b0-4f84-b131-b8f6dc3711d0" />
The core logic of LSR seems to largely follow the "less interesting" part of the description. Most of the test case improvements I saw were mainly related to rewriting loop exit values (rather folding them). This is one of the last things LSR does.
<img width="792" height="338" alt="image" src="https://github.com/user-attachments/assets/fbe8e043-1420-4759-b527-eda5cee1f833" />
I am starting to think this portion could be its own pass (where we will incur the extra overhead of adding a new pass entirely) or probably better could be part of the LoopTermFold pass which immediately succeeds LSR in the pipeline and I think is more in line with the "Loop Pass" expectations set by NPM.
https://github.com/llvm/llvm-project/pull/193824
More information about the llvm-commits
mailing list