https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69526
--- Comment #8 from amker at gcc dot gnu.org ---
(In reply to rdapp from comment #7)
> (In reply to amker from comment #6)
>
> > It comes from loop niter analysis, as in may_eliminate_iv, we have:
> >
> > (gdb) call debug_generic_expr(desc->niter)
> > n_5(D) + 4294967295
>
> and this is correct? I.e. the number of iterations is n - 1? I'd naively
> expect
> desc->niter = n_5(D)
>
> (Again, it might be necessary for some reason escapes me currently)
It confused me too, but niter in tree_niter_desc means the number of time latch
is executed, as commented in tree-ssa-loop.h:
tree niter; /* The expression giving the number of iterations of
a loop (provided that assumptions == true and
may_be_zero == false), more precisely the number
of executions of the latch of the loop. */