[llvm] [LLVM] Skip non-overlapping subranges (PR #227852)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 05:14:07 PDT 2026


================
@@ -1383,8 +1383,10 @@ MachineBasicBlock *MachineBasicBlock::SplitCriticalEdge(
         }
       } else if (!isLiveOut && !isLastMBB) {
         LI.removeSegment(StartIndex, EndIndex);
-        for (auto &SR : LI.subranges())
-          SR.removeSegment(StartIndex, EndIndex);
+        for (auto &SR : LI.subranges()) {
+          if (SR.overlaps(StartIndex, EndIndex))
----------------
arsenm wrote:

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

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


More information about the llvm-commits mailing list