[llvm] [Utils] Fix incorrect LCSSA PHI nodes when splitting critical edges with MergeIdenticalEdges (PR #131744)
    Nikita Popov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Mar 19 09:12:24 PDT 2025
    
    
  
================
@@ -288,7 +293,11 @@ llvm::SplitKnownCriticalEdge(Instruction *TI, unsigned SuccNum,
 
         // Update LCSSA form in the newly created exit block.
         if (Options.PreserveLCSSA) {
-          createPHIsForSplitLoopExit(TIBB, NewBB, DestBB);
+          // If > 1 identical edges to be splitted, we need to introduce 
+          // the incoming blocks of the same number for the new PHINode.
----------------
nikic wrote:
```suggestion
          // the same number of incoming blocks for the new PHINode.
```
https://github.com/llvm/llvm-project/pull/131744
    
    
More information about the llvm-commits
mailing list