GCC beaten by ICC in stupid trig test!

Paolo Carlini pcarlini@suse.de
Mon Mar 15 11:25:00 GMT 2004


Andrew Pinski wrote:

> The reason why still is that ICC will just unroll the loop to be "r = 
> doit(a)*100000000.0" so that is the reasons why
> ICC is better than GCC at doing this stupid trig test (note this is 
> transformation
> is only valid if fast-math is on as you loose precision).

In the meanwhile we have learned that the real reason why Icc performs
better then mainline gcc is the use of an iterative SSE instruction
(see Dan Nicolaescu message).

On the other hand, gcc-lno "appear" to perform as well as Icc because of
the unrolling trick (just checked that gcc-lno transforms the loop to
the trivial:

   8048470:       40                      inc    %eax
   8048471:       d8 c1                   fadd   %st(1),%st
   8048473:       3d 00 e1 f5 05          cmp    $0x5f5e100,%eax
   8048478:       75 f6                   jne    8048470 <main+0x20>)

Now, my question is: why gcc-lno is doing that also when -ffast-math is
*not* passed???

Paolo.



More information about the Gcc mailing list