https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115025

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |tree-optimization
            Summary|[14/15/16 regression] prime |[14/15/16 regression] prime
                   |computation performance     |computation performance
                   |regression, x86, between    |regression, x86, between
                   |gcc-14 and gcc-13 on        |gcc-14 and gcc-13 on
                   |skylake platform            |skylake platform due to not
                   |                            |peeling the first iteration
                   |                            |off the loop any more in ch

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC 15 improved this function by doing shrink wrapping the call to sqrt.
And trunk now removes the call to sqrt even.

So smaller values are better.

Note the code in stress-cpu.c actually uses nprimes so that is not an issue.

Note ch peeling the first iteration was an unexpected thing and was a
regression introduced in GCC 5; just happened to improve some cases like this
due to div being done without the div instruction.

Note clang/LLVM also does not peel the first iteration.

I am almost want to close as won't fix. what do others think?

Reply via email to