This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, powerpc] Generate FRIZ for (double)(long) under -ffast-math on powerpc
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 1 Sep 2010 19:37:16 -0400
- Subject: Re: [PATCH, powerpc] Generate FRIZ for (double)(long) under -ffast-math on powerpc
- References: <20100901152456.GA5449@hungry-tiger.westford.ibm.com>
On Wed, Sep 1, 2010 at 11:24 AM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> This patch optimizes (double)(long) operations to generate a single FRIZ round
> instruction, instead of the convert to 64-bit integer and back. ?It is only
> done under -ffast-math because the FRIZ instruction generates a different
> answer if the value is larger or smaller than will fit in a 64-bit integer
> value. ?I added a -mno-friz/-mfriz option to control whether this is generated
> or not.
>
> I did a bootstrap and make check yeilded no regressions. ?Is this ok to install
> in the tree?
>
> [gcc]
> 2010-08-31 ?Michael Meissner ?<meissner@linux.vnet.ibm.com>
>
> ? ? ? ?* config/rs6000/rs6000.opt (-mfriz): New switch to control whether
> ? ? ? ?to convert (double)(long) into a single FRIZ instruction or not
> ? ? ? ?when -ffast-math is used.
>
> ? ? ? ?* config/rs6000/vsx.md (VSX_DF): New iterator for DF/V2DF modes.
> ? ? ? ?(vsx_float_fix_<mode>2): Optimize (double)(long) into X{S,V}RDPIZ
> ? ? ? ?or FRIZ instruction if -ffast-math.
> ? ? ? ?* config/rs6000/rs6000.md (friz): Ditto.
>
> ? ? ? ?* doc/invoke.texi (RS/6000 and PowerPC Options): Document -mfriz.
>
> [gcc/testsuite]
> 2010-08-31 ?Michael Meissner ?<meissner@linux.vnet.ibm.com>
>
> ? ? ? ?* gcc.target/powerpc/ppc-fpconv-10.c: New file to test generating
> ? ? ? ?FRIZ/XSRIZ instruciton for (double)(long long)x.
> ? ? ? ?* gcc.target/powerpc/ppc-fpconv-11.c: Ditto.
Okay.
Thanks, David