This is the mail archive of the 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: Enable SSE math on i386 with -Ofast

> >  In meantime I (partially,
> > since megrez stopped producing 32bit spec2k6 results) benchmarked
> > -mfpmath=sse,387 and it does not seem to be a loss anymore.  So perhaps we can
> > give it a try?
> Not sure ... I would guess that it's not a win on any recent architecture
> (and LRA is probably not well-prepared here either).

I think it has chance to win when the input/out registers are forced to be in
387 (because of return value ABI) and perhaps with register pressure in cases
two independent computtions are going on and LRA can home one in SSE and other
in 387 registers.  Don't really know.

Main advantage of 387 is that it is significantly more compact than SSE. Last
hardware really favouring 387 was probably original pentium4 (where additions
was better pipelined on 387 path if I recall correctly).  I wonder how AVX
changed this.  I was thus thining about adding a mode where we chose 387 or SSE
based on fact if function is optimzed for size.
The size difference is quite high - around 5% on specfp.
> > > change the ABI ... (do we change the local functions ABI with 
> > > -mfpmath=sse?)
> > 
> > We don't.  It is probably quite easy to default to sse_regparm and change return value type.
> > I will look into it.
> Thanks.  That's independent of enabling -mfpmath=sse at -Ofast of course.
Yep, my plan is to enable fpmath with -Ofast today and look into those two items incrementally.

> Richard.

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