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: SSE conversion optimization


On Sun, Sep 09, 2007 at 12:02:28AM +0200, Jan Hubicka wrote:
> ! 	  For flat_trapping_math we can't safely use vector conversion without
> ! 	  clearing upper half, otherwise precision exception might occur.
> ! 	  However we can still generate the common sequence converting value
> ! 	  from general register to XMM register as:
> ! 
> ! 	    mov 	reg32, mem32
> ! 	    movd	mem32, xmm
> ! 	    cvtdq2pd xmm,xmm
> ! 
> ! 	  because we know that movd clears the upper half.
> ! 

I am afraid this hurts Core 2 Duo since it changes

cvtsi2sd reg32, xmm

to

mov reg32, mem32
movd mem32, xmm
cvtdq2pd xmm,xmm

This is very bad for Core 2 Duo.  I saw 10% slow down on one 
SPEC CPU 2006 FP benckmark on Core 2 Duo.  I am rerunning
SPEC CPU 2006 with this one disabled on Core 2 Duo.


H.J.


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