https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68963
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Hmm, I think it's rather discover_iteration_bound_by_body_walk that merges the two estimates of 3 iterations from both arms even though those are not based off the same IV. OTOH the estimates itself assume we are talking about the first N iterations not any N iterations. So it might be fundamentally flawed. Testsuite fallout from the patch which shows recording those upper bounds was intended: FAIL: gcc.dg/tree-ssa/cunroll-10.c scan-tree-dump-times cunroll "Forced statemen t unreachable" 2 FAIL: gcc.dg/tree-ssa/cunroll-11.c scan-tree-dump cunroll "Loop 1 iterates at mo st 3 times" FAIL: gcc.dg/tree-ssa/cunroll-9.c scan-tree-dump-times cunrolli "Removed pointle ss exit:" 1 FAIL: gcc.dg/tree-ssa/loop-38.c scan-tree-dump cunrolli "Loop 1 iterates at most 11 times" Honza?