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 <sergey.shal...@intel.com> gcc/ * config/i386/i386.h (TARGET_PREFER_AVX256): Also enable when TARGET_PREFER_AVX128 is set. -----Original Message----- From: Uros Bizjak [mailto:ubiz...@gmail.com] Sent: Wednesday, November 22, 2017 9:18 PM To: Shalnov, Sergey <sergey.shal...@intel.com> Cc: gcc-patches@gcc.gnu.org; kirill.yuk...@gmail.com; Koval, Julia <julia.ko...@intel.com>; Senkevich, Andrew <andrew.senkev...@intel.com>; Peryt, Sebastian <sebastian.pe...@intel.com>; Ivchenko, Alexander <alexander.ivche...@intel.com>; Joseph Myers <jos...@codesourcery.com> Subject: Re: [PATCH, i386] Fix behavior for –mprefer-vector-width= option On Wed, Nov 22, 2017 at 3:58 PM, Shalnov, Sergey <sergey.shal...@intel.com> 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 <sergey.shal...@intel.com> 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