[llvm] [LoopInterchange] Also look at lcssa phis in outer loop latch block (PR #160889)
Sjoerd Meijer via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 2 05:41:56 PDT 2025
sjoerdmeijer wrote:
I was just looking at this again to address earlier comments, and noticed your comments, thanks!
Just a quick question about your question to check if I understand:
> If LoopInterchange has to build LCSSA form again anyway, have you considered cleaning this up at the same time?
Are you suggesting that instead of moving LCSSA nodes around, delete (all of) them, because interchange brings it back into LCSSA anyway? Maybe this is all related, and I will admit that I am struggling with fixing this. The reason is that the whole CFG is rewired, new blocks are created, and a lot of instructions are moved around including these lcssa phis. And it's difficult to see what guarantees what, and like you said, I have doubts about other patterns. So, if the suggestion is to not move all these lcssa phis around, maybe that helps.
https://github.com/llvm/llvm-project/pull/160889
More information about the llvm-commits
mailing list