This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Committed: Optimize MMX moves.
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 24 Feb 2008 11:41:36 -0500 (EST)
- Subject: Re: [PATCH, i386]: Committed: Optimize MMX moves.
- References: <47C0395C.30908@gmail.com>
On Sat, 23 Feb 2008, Uros Bizjak wrote:
> Hello!
>
> This patch optimizes MMX register moves, but still prevents MMX
> registers to be used where not absolutely necessary. This is achieved by
> decorating "y" constraints (MMX class reg) with "!" in move patterns for
> natural MMX modes (V8QI, V4HI, V2SI).
>
> 2008-02-23 Uros Bizjak <ubizjak@gmail.com>
>
> PR target/22076
> PR target/34256
>
> * config/i386/mmx.md (*mov<mode>_internal_rex64): Use "!y" to
> prevent reload from using MMX registers.
> (*mov<mode>_internal): Ditto.
> (*movv2sf_internal_rex64): Ditto.
> (*movv2sf_internal): Ditto.
>
> testsuite/ChangeLog:
>
> 2008-02-23 Uros Bizjak <ubizjak@gmail.com>
>
> PR target/22076
> PR target/34256
> * gcc.target/i386/pr22076.c: New test.
> * gcc.target/i386/pr34256.c: New test.
> * gcc.target/i386/vecinit-5.c: New test.
> * gcc.target/i386/vecinit-6.c: New test.
> * gcc.target/i386/vecinit-[1-4].c: Check that no MMX register is
> used.
>
> * g++.dg/compat/struct-layout-1.h: Do not include <mmintrin.h> and
> <xmmintrin.h>, define __m64 and __m128 directly.
> * g++.dg/compat/struct-layout-1_generate.c: Add -mno-mmx for x86.
>
>
> Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
> {,-m32}. It fixes a bunch of PRs (and duplicates) dealing with unoptimal
> MMX register moves. As this is tricky stuff, I'll watch for fallout.
>
> Patch is committed to mainline.
> Uros.
I'm getting a -fpic/-fPIC failure in gcc.target/i386/pr34256.c:
http://gcc.gnu.org/ml/gcc-testresults/2008-02/msg01643.html
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu