On Thu, 2014-01-16 at 09:11 +0100, Uros Bizjak wrote: > On Wed, Jan 15, 2014 at 2:19 PM, Peter Bergner <berg...@vnet.ibm.com> wrote: > > Backport from mainline > > 2013-09-06 Jan Hubicka <j...@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)