: [PATCH, reginfo.c, i386.c] Backport fix for PR58139 to 4.8

Uros Bizjak ubizjak@gmail.com
Thu Jan 16 12:49:00 GMT 2014


On Thu, Jan 16, 2014 at 1:39 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?

Yes, just use [1] from mainline.

[1] http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00954.html

Thanks,
Uros.



More information about the Gcc-patches mailing list