Uros, Thank you for review. New patch with addressed comments is attached. Could you please merge it?
Thank you Sergey 2017-11-23 Sergey Shalnov <[email protected]> gcc/ * config/i386/i386.h (TARGET_PREFER_AVX256): Also enable when TARGET_PREFER_AVX128 is set. -----Original Message----- From: Uros Bizjak [mailto:[email protected]] Sent: Wednesday, November 22, 2017 9:18 PM To: Shalnov, Sergey <[email protected]> Cc: [email protected]; [email protected]; Koval, Julia <[email protected]>; Senkevich, Andrew <[email protected]>; Peryt, Sebastian <[email protected]>; Ivchenko, Alexander <[email protected]>; Joseph Myers <[email protected]> Subject: Re: [PATCH, i386] Fix behavior for –mprefer-vector-width= option On Wed, Nov 22, 2017 at 3:58 PM, Shalnov, Sergey <[email protected]> wrote: > Hi, > This patch making –mprefer-vector-width= option inclusive. This means > that if we use –mprefer-vector-width=128 it should switch > TARGET_PREFER_AVX128=ON and TARGET_PREFER_AVX256=ON also. > It is minor change to generate “xmm” with –mprefer-vector-width=128 on > the platform with “zmm”. > > Sergey > > 2017-11-22 Sergey Shalnov <[email protected]> gcc/ > * config/i386/i386.h (TARGET_PREFER_AVX256): Add inclusiveness of > the TARGET_PREFER_AVX256 for TARGET_PREFER_AVX128 You could just say: * config/i386/i386.h (TARGET_PREFER_AVX256): Also enable when TARGET_PREFER_AVX128 is set. +#define TARGET_PREFER_AVX256 (TARGET_PREFER_AVX128 || \ + (prefer_vector_width_type == PVW_AVX256)) No need for extra parenthesis, and following the GNU coding standard, the condition should start on the next line: #define TARGET_PREFER_AVX256 (TARGET_PREFER_AVX128 \ || prefer_vector_width_type == PVW_AVX256) Otherwise OK. Uros.
0006-Fix-behavior-for-mprefer-vector-width-option.patch
Description: 0006-Fix-behavior-for-mprefer-vector-width-option.patch
