This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: : [PATCH, reginfo.c, i386.c] Backport fix for PR58139 to 4.8
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, Vladimir Makarov <vmakarov at redhat dot com>, Richard Henderson <rth at redhat dot com>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Thu, 16 Jan 2014 06:39:45 -0600
- Subject: Re: : [PATCH, reginfo.c, i386.c] Backport fix for PR58139 to 4.8
- Authentication-results: sourceware.org; auth=none
- References: <1389791978 dot 5729 dot 776 dot camel at otta> <CAFULd4aWP9d8SvyKk5dB4S_D2bfxAmwUwRXjb0sP3TYtrjtidg at mail dot gmail dot com>
On Thu, 2014-01-16 at 09:11 +0100, Uros Bizjak wrote:
> On Wed, Jan 15, 2014 at 2:19 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> > Backport from mainline
> > 2013-09-06 Jan Hubicka <jh@suse.cz>
> >
> > * config/i386/i386.c (ix86_hard_regno_mode_ok): AVX modes are valid
> > only when AVX is enabled.
>
> OK for x86, with slight update, as suggested below.
>
> > Index: gcc/config/i386/i386.c
> > ===================================================================
> > --- gcc/config/i386/i386.c (revision 206582)
> > +++ gcc/config/i386/i386.c (working copy)
> > @@ -33944,7 +33944,7 @@ ix86_hard_regno_mode_ok (int regno, enum
> > are available. OImode move is available only when AVX is
> > enabled. */
> > return ((TARGET_AVX && mode == OImode)
> > - || VALID_AVX256_REG_MODE (mode)
> > + || (TARGET_AVX && VALID_AVX256_REG_MODE (mode))
>
> Please use VALID_AVX256_REG_OR_IO_MODE define:
We were already testing for OImode, so do you want me to
remove the redundant compare and make the code look like
the following instead?
Peter
Index: i386.c
===================================================================
--- i386.c (revision 206582)
+++ i386.c (working copy)
@@ -33943,8 +33943,7 @@ ix86_hard_regno_mode_ok (int regno, enum
out of SSE registers, even when no operation instructions
are available. OImode move is available only when AVX is
enabled. */
- return ((TARGET_AVX && mode == OImode)
- || VALID_AVX256_REG_MODE (mode)
+ return ((TARGET_AVX && VALID_AVX256_REG_OR_OI_MODE (mode))
|| VALID_SSE_REG_MODE (mode)
|| VALID_SSE2_REG_MODE (mode)
|| VALID_MMX_REG_MODE (mode)