[PATCH] Fix PR71477

Richard Biener rguenther@suse.de
Fri Jun 10 09:31:00 GMT 2016


On Fri, 10 Jun 2016, Richard Sandiford wrote:

> Richard Biener <rguenther@suse.de> writes:
> > Committed as obvious.
> >
> > Richard.
> >
> > 2016-06-10  Richard Biener  <rguenther@suse.de>
> >
> > 	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).

Honza?

Richard.



More information about the Gcc-patches mailing list