This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: List of simplifications we should perform
- To: <Richard dot Earnshaw at arm dot com>
- Subject: Re: List of simplifications we should perform
- From: Daniel Berlin <dan at www dot cgsoftware dot com>
- Date: Fri, 11 May 2001 08:26:48 -0400 (EDT)
- cc: Andi Kleen <ak at suse dot de>, <gcc at gcc dot gnu dot org>
On Fri, 11 May 2001, Richard Earnshaw wrote:
> >
> >
> > On 11 May 2001, Andi Kleen wrote:
> >
> > > Daniel Berlin <dan@www.cgsoftware.com> writes:
> > >
> > > If this is supposed to be C...
> > >
> > > > Simplifications for ~ and !:
> > > >
> > > > ! ! j j
> > >
> > > !!j is not j, it is j?1:0.
> > >
> > That's what I thought, but SGI's compiler quite clearly disagrees.
> > It just says:
> >
> > if (<it's of the form ! ! j>)
> > delete the not's.
> >
> > It performs this at all optimization levels, too.
>
> Then it looks like a bug, since clearly
>
> x + !!j != x + j
>
> Just consider j = 2
>
Likely.
As I said, I just took the list from the comments, and verified the rules
they are printing out when they do each simplification matches the
comments (IE they print out what the simplifier is doing), to avoid
single typos that may have been made.
Dunno if the simplifier is new to pro64, or if it's in the 7.x compilers
as well.
If it's new to pro64, it would help explain why nobody's noticed yet.
--Dan