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 beaten by ICC in stupid trig test!


Hello,

> >You need to allow for the possibility of doit trapping, but moving it
> >should still be OK in this case by virtue of C99 F.8.1#3: you don't need
> >to keep the same number of traps as implied by the source code.
> > 
> >
> Ah! Today I'm learning *too* much, thanks to everyone!
> 
> Now, I have another question: when -ffast-math is passed, should we even 
> collapse
> the loop to a single integer to be multiplied by the return value of doit?
> 
> Currently, on the gcc-lno branch we don't do that... or we don't *want* 
> to do that? ;)

we do not do that currently.  Something similar is on my todo list --
replacement of the final value of an eliminated induction variable,
as in

for (i = 0; i < 100; i++)
  a = 10 * i;
foo (a);

to

for (i = 0; i < 100; i++);
a = 1000;
foo (a);

but I am not sure whether to do it for non-integer variables as
well, due to reasons you mention below.

Zdenek

> Naively, seems something really tricky to attempt because the sum 
> involving the loop
> index i may overflow in the process.


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