This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Benchmarks (coybench), AMD64 and i686, 14 August 2004
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, gcc at gcc dot gnu dot org
- Date: Tue, 17 Aug 2004 17:13:11 -0700
- Subject: Re: GCC Benchmarks (coybench), AMD64 and i686, 14 August 2004
- References: <10408172224.AA13849@vlsi1.ultra.nyu.edu> <41229A84.6000206@gnat.com>
On Tue, Aug 17, 2004 at 07:53:40PM -0400, Robert Dewar wrote:
> Richard Kenner wrote:
>
> > The trig identity that 2*sin(x)*cos(x) is sin(2*x) is more iffy; we'd
> > waste time trying to apply such transformations to every tree, and
> > it's pretty much exactly what caused such controversy when everyone
> > did it to Whetstone.
> >
> > Although I agree with you in general about tuning to benchmarks, I disagree
> > with the above. When you consider some of the even more obscure cases in
> > both tree and RTL folding, that doesn't seem so peculiar anymore.
>
> It seems completely wrong to me. I guess people who use -ffast-math
> tolerate these kind of non-optimizations (an optimization to me is
> a transformation that is meaning preserving, not a substitution of
> some other computation that gives a different result!)
Are we sure that ICC does 2*sin(x)*cos(x) -> sin(2*x)? It seems to me
that just being able to produce x < PI2 ? 2*sin(x)*cos(x) : 0.0 gives
most of the available speedup. Such a transformation should be achievable
and preserves the result.