[llvm] [LoopInterchange] Also look at lcssa phis in outer loop latch block (PR #160889)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 2 05:26:41 PDT 2025
https://github.com/Meinersbur commented:
If LoopInterchange has to build LCSSA form again anyway, have you considered cleaning this up at the same time? Then to be on the save side, do not any PHI nodes in `OuterLoopLatch` unless `InnerLoopExit == OuterLoopLatch` (like there is already a check `InnerLoopPreHeader != OuterLoopHeader` in `tightlyNested`). In addition to the case where `%old.cond.lcssa` is not trivally dead, I could imagine other dubious patterns, such as a PHI node referencing itself.
https://github.com/llvm/llvm-project/pull/160889
More information about the llvm-commits
mailing list