This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] -mfpmath=sse should disable x387 intrinsics


On Tue, 23 Nov 2004 09:14:05 -0700 (MST), Roger Sayle
<roger@eyesopen.com> wrote:
> 
> 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.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]