Re: Somewhat OT: gcc, x86, -ffast-math, and Linux

From: Jakub Jelinek
Date: Sat Mar 27 2004 - 10:15:46 EST

On Sat, Mar 27, 2004 at 02:24:59PM +0000, Jamie Lokier wrote:
> GCC's manual claims that fsin, fcos and fsqrt instructions are only
> used if the -funsafe-math-optimizations flag is also used, if the GCC
> version is >= 2.6.1. However you may find that Glibc's <math.h> ends
> up using those instructions when -ffast-math is used alone.

Well, -ffast-math sets -funsafe-math-optimizations, unless you do
-ffast-math -fno-unsafe-math-optimizations, so the difference is not that
big. glibc math inlines will be eventually replaced by GCC builtins as soon
as GCC is known to optimize at least as good as glibc's math inlines and so
even that difference will cease to exist.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at