This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC Benchmarks (coybench), AMD64 and i686, 14 August 2004



On Aug 17, 2004, at 8:13 PM, Joe Buck wrote:


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.


Neither is what ICC does, actually.
At least according to it's debug dumps.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]