[llvm] [SimplifyCFG] Increase iterative simplification convergence limit. (PR #178406)

Marcos Maronas via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 28 05:37:21 PST 2026


================
@@ -244,7 +244,7 @@ static bool iterativelySimplifyCFG(Function &F, const TargetTransformInfo &TTI,
   unsigned IterCnt = 0;
   (void)IterCnt;
   while (LocalChange) {
-    assert(IterCnt++ < 1000 && "Iterative simplification didn't converge!");
+    assert(IterCnt++ < 2000 && "Iterative simplification didn't converge!");
----------------
maarquitos14 wrote:

I agree. I don't see how this assertion would help hangs unless for some reason they were using assertions in prod code.

> Ideally a clever heuristics should be implemented, though probably not in the scope of the patch.

Indeed, that would be the ideal solution, but it's out of scope for this patch.

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


More information about the llvm-commits mailing list