This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC beaten by ICC in stupid trig test!
Hello,
> >doing what? I do not see any loop related optimization here.
> >
> Hi Zdenek. What is doing "the trick" (sorry for my informal words) on the
> gcc-lno branch is -ftree-loop-optimize, *not* -funroll-loops.
>
> When -ftree-loop-optimize is passed, the trigonometric computation (doit)
> is moved outside of the loop, this is the complete result:
[snip]
> Perhaps it's ok moving doit even when -ffast-math is not passed, I don't
> know for sure, honestly...
it should be -- it is just an invariant motion (the value returned by
doit obviously is always the same, since we invoke it with the same
argument).
Zdenek