> > > PR middle-end/71477 > > > * cfgloop.c (alloc_loop): Initialize nb_iterations_likely_upper_bound. > > > > > > Index: gcc/cfgloop.c > > > =================================================================== > > > --- gcc/cfgloop.c (revision 237286) > > > +++ gcc/cfgloop.c (working copy) > > > @@ -331,6 +331,7 @@ alloc_loop (void) > > > loop->exits->next = loop->exits->prev = loop->exits; > > > loop->can_be_parallel = false; > > > loop->nb_iterations_upper_bound = 0; > > > + loop->nb_iterations_likely_upper_bound = 0; > > > loop->nb_iterations_estimate = 0; > > > return loop; > > > } > > > > Everywhere else protects uses of loop->nb_iterations_likely_upper_bound > > with loop->any_likely_upper_bound, so shouldn't we add the "missing" > > guards to tree-vect-loop.c instead? > > Possibly, though the code is somewhat special in that it adjusts > the values (also for nb_iteratins_upper_bound which similarly > lacks a any_upper_bound check).
Possibly. The check for nb_iteratins_upper_bound was already missing, so I tought that adjusting is safe even when the bound is not computed (I assumed it is initialized to 0 so I did not see invalid wide int appearing here). I think having the initialization is good, so we get the code symmetric with nb_iterations_upper_bound (or we can drop both). Similarly we may add the check whether the bound is set if we want to avoid useless adjustments. Thanks for fixing this! Honza