PATCH: Support inline SSE/SSE2
Jakub Jelinek
jakub@redhat.com
Tue Nov 25 20:48:00 GMT 2003
On Tue, Nov 25, 2003 at 12:35:46PM -0800, H. J. Lu wrote:
> 2003-11-25 H.J. Lu <hongjiu.lu@intel.com>
>
> * sysdeps/i386/fpu/bits/mathinline.h (sqrt): Don't inline
> sqrt for gcc 3.3 and above if SSE2 is enabled
>
> --- bits/mathinline.h.orig 2003-11-24 16:13:44.000000000 -0800
> +++ bits/mathinline.h 2003-11-25 12:05:14.000000000 -0800
> @@ -439,8 +439,10 @@ __inline_mathcodeNP2 (fmod, __x, __y, \
>
>
> #ifdef __FAST_MATH__
> +# if !__GNUC_PREREQ (3,3) || !defined __SSE2__
> __inline_mathopNP (sqrt, "fsqrt")
> __inline_mathopNP_ (long double, __sqrtl, "fsqrt")
> +# endif
> #endif
Why the || !defined __SSE2__ part there?
GCC 3.3+ has __builtin_sqrt{,f,l} and should generate the best -ffast-math
code no matter whether -msse2 or not. It will generate fsqrt too when
it thinks it is beneficial.
Jakub
More information about the Libc-alpha
mailing list