[llvm] [LSR][RFC] Improve LCSSA preservation ? (PR #185373)

Vikram Hegde via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 23:03:44 PDT 2026


vikramRH wrote:

> At the IR level we end up sinking a `getelementptr` which duplicates it, but it just gets folded away and we end up with less instructions. I'm not entirely sure why LCSSA makes the pass more effective in this case, but it does. It's possible there could be regressions from not looking through LCSSA phi nodes, but I haven't seen anything yet and it shouldn't be hard to fix if it does come up.

Interesting, I did not check the assembly before. If this is the case would it make sense to go ahead with this as is right now provided we handle the remaining scevexpander regressions too ?

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


More information about the llvm-commits mailing list