[llvm] [LoopInfo] Do not enqueue unreachable nodes; fix infinite loop (PR #214832)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 22:34:35 PDT 2026
================
@@ -664,7 +664,9 @@ void LoopInfoBase<BlockT, LoopT>::analyze(
// Whatever reaches a latch without passing the header is in the loop.
for (unsigned I = 0; I != Worklist.size(); ++I)
for (BlockT *Pred : inverse_children<BlockT *>(Worklist[I]))
- enqueue(Pred);
+ // Do not enqueue any unreachable nodes
----------------
aengelke wrote:
```suggestion
// Do not enqueue any unreachable nodes.
```
https://github.com/llvm/llvm-project/pull/214832
More information about the llvm-commits
mailing list