This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] -mfpmath=sse should disable x387 intrinsics
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Nov 2004 18:57:55 +0100
- Subject: Re: [PATCH] -mfpmath=sse should disable x387 intrinsics
- References: <Pine.LNX.firstname.lastname@example.org>
- Reply-to: Richard Guenther <richard dot guenther at gmail dot com>
On Tue, 23 Nov 2004 09:14:05 -0700 (MST), Roger Sayle
> The following simple patch addresses a performance regression I
> observed upgrading an x86_64/amd64 box from gcc 3.3.3 to gcc 3.4.3.
> I turns out that the problem is that x86_64 uses FPMATH_SSE by
> default, and the regression was inadvertantly caused by GCC's
> improved support for inline FP intrinsics on x87.
> The slowdown is caused by the shuffling of floating point values
> between SSE registers and the x87 registers required by these
> intrinsics. Additionally, glibc for x86_64 contains fast and
> often more accurate implementations of these math routines in
> it's libm.
Do we have/want synthesized SSE intrinsics for inline placement (and
possibly better scheduling)? Do other compilers do this? Also this may have
bad impacts on non x86_64 systems where libm in turn uses x87 intrinsics
and so we just do no inlining anymore.