On Sun, Nov 18, 2012 at 10:50:53AM +0000, Richard Sandiford wrote:
> Tom de Vries <tom_devr...@mentor.com> writes:
> > 2012-11-17  Tom de Vries  <t...@codesourcery.com>
> >
> >     PR rtl-optimization/55315
> >
> >     * rtlanal.c (nonzero_address_p): Don't assume a nonzero address plus a
> >     const is a nonzero address.
> >
> >     * gcc.target/mips/pr55315.c: New test.
> 
> OK, thanks.

I think this is just papering over the problem that we don't distinguish
between pointer and integer arithmetics at RTL level (yeah, there is
REG_POINTER, but can we take it as guaranteed that integer arithmetics
is performed without REG_POINTER while pointer arithmetics with them?),
but in many places in RTL we just assume pointer arithmetics rules.
The above assumption that nonzero_address_p plus constant is nonzero
should be fine assumption in pointer arithmetics, so are many aliasing
assumptions, but they aren't valid for integer arithmetics.  We have several
open PRs for this I believe.

        Jakub

Reply via email to