Hello!

I have tripped over a problem, where #defines from libc
(bits/mathinline.h) interfere badly with gcc's intrinsics.

The problem (note the #include):

--cut here--
#include <math.h>

double test (double x)
{
  return ceil(x);
}
--cut here--

when compiled with -O2 -ffast-math -msse2 -mfpmath=sse, compiles to
asm that involves x87 insns from mathinline.h. Adding
-D__NO_MATH_INLINES compiles to expected SSE code.

As recent gcc implements all libc math intrinsics as its own builtin
intrinsics, and due to the above interference, I'd like to propose
that gcc defines __NO_MATH_INLINES on x86_32 target for -ffast-math,
for both -mfpmath=sse and -mfpmath=x87.

Uros.

Reply via email to