[patch] for PR18463

Daniel Berlin dberlin@dberlin.org
Tue Sep 20 12:53:00 GMT 2005


On Mon, 2005-09-19 at 17:03 +0200, Zdenek Dvorak wrote:
> Hello,
> 
> Sebastian's recent changes to chrec_convert cause this testcase (as well
> as some of spec benchmarks) regress on i686.  The reason is the
> following.  We have loop (obtained by expanding pointer arithmetics) like
> 
> unsigned i, j;
> float *p, *a, *o;
> 
> for (i = 0; i < n; i++)
>   {
>     j = 4 * i;
>     o = (float *) j;
>     p = a + o;
> 
>     *p = something;
>   }
> 
> With the changes to chrec_convert, since we cannot prove that j does not
> wrap, we set the evolution of o to chrec_dont_know. 


Actually, scev_probably_wraps_p should return "doesn't wrap" for this
case, because pointers don't wrap and the only use of this variable is
in pointer arithmetic.
Can you try to figure out why it doesn't  (since this will affect other
things)	?

Look at the code around tree-ssa-loop-niter.c:1845




More information about the Gcc-patches mailing list