[LoopFusion] sink second loop PHIs
Fixes https://github.com/llvm/llvm-project/issues/59023 PHI nodes that are in the second loop only have the first loop as its predecessor. These PHI nodes should be sunk to the end of the fused loop. If the second loop uses the PHI, then the loops cannot be fused. I don't think this should happen in typical compilation workflows. The PHI will be in a dedicated exit block of the first loop following LCSSA transformations. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D139812
Loading
Please sign in to comment