[Bug tree-optimization/34244] [4.3 Regression] VRP/SCEV miscompiles Firefox

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Wed Nov 28 16:13:00 GMT 2007



------- Comment #8 from rguenther at suse dot de  2007-11-28 16:13 -------
Subject: Re:  [4.3 Regression] VRP/SCEV miscompiles
 Firefox

On Wed, 28 Nov 2007, rakdver at kam dot mff dot cuni dot cz wrote:

> > ------- Comment #6 from rguenth at gcc dot gnu dot org  2007-11-28 15:47 -------
> > We could clear the SCEV cache for an SSA_NAME we set a new value range
> > (in set_value_range and set_value_range_to_varying), but I
> > see that SCEV also caches loop->nb_iterations which we probably would need to
> > clear unconditionally (for all loops).
> 
> yes, the simplest solution is to call scev_reset somewhere (either in
> set_value_range, or in adjust_range_with_scev).  However, I fear the
> compile time impact would be too large (# of iterations analysis is
> fairly time consuming, and not caching the results used to cause
> us to spend 10% or more in it).
> 
> More feasible solution seems to be to determine the number of iterations
> for all loops before the start of VRP, and to remember the values.

Or not use tree_expr_nonnegative_p from inside tree-ssa-loop-niter.c
which is where the bad feedback comes from.  But yes, computing the
number of iterations in advance should fix this as well and is probably
best.

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34244



More information about the Gcc-bugs mailing list