[PATCH] Add VSX fmaxf/fminf optimization on rs6000
David Edelsohn
dje.gcc@gmail.com
Tue Nov 2 19:31:00 GMT 2010
On Fri, Oct 22, 2010 at 4:26 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> I've carried the following patch in my sandbox for the next round of floating
> point conversion fixes for some time, and I'm submitting it as a stand alone
> patch. On VSX power systems, scalar single precision floating point values are
> kept internally as double precision. For min/max, there is no need to do a
> rounding step, since the compiler believes both values are single precision, so
> we can use the double precision min/max instructions instead of doing a
> floating point compare and select.
>
> I've done a bootstrap and make check with no regressions. Is it ok to install
> this patch?
>
> [gcc]
> 2010-10-22 Michael Meissner <meissner@linux.vnet.ibm.com>
>
> * config/rs6000/rs6000.c (rs6000_emit_minmax): Add support to use
> xsmindp/xsmaxdp on VSX for single precision min/max.
> * config/rs6000/vsx.md (vsx_smaxsf3): Ditto.
> (vsx_sminsf3): Ditto.
>
> [gcc/testsuite]
> 2010-10-22 Michael Meissner <meissner@linux.vnet.ibm.com>
>
> * gcc.target/powerpc/vsx-sfminmax.c: New test for using double
> precision min/max for single precision on VSX.
Okay.
Thanks, David
More information about the Gcc-patches
mailing list