On Tue, Nov 21, 2017 at 4:50 PM, Shalnov, Sergey
<sergey.shal...@intel.com> wrote:
> Uros,
> I did new patch with all comments addressed as proposed.
> 1. old option -mprefer-avx128 is Alias(mprefer-vector-width=, 128, none)
> 2. Simplified default initialization (as Bernhard proposed)
> 3. Fixed documentation (proposed by Sandra)
> 4. Several tests are changed to use new style of the option but many leaved 
> with -mprefer-avx128 (one test with new style -mprefer-vector-width=128)
>
>
> 2017-11-21  Sergey Shalnov  <sergey.shal...@intel.com>
>
> gcc/
>         * config/i386/i386-opts.h (enum prefer_vector_width): Added new enum
>         for the new option -mprefer-vector-width=[none|128|256|512].
>         * config/i386/i386.c (ix86_target_string): remove old style options
>         -mprefer-avx256 and make -mprefer-avx128 as alias.
>         (ix86_option_override_internal):  Apply defaults for the
>         -mprefer-vector-width=[128|256] option.
>         * config/i386/i386.h (TARGET_PREFER_AVX128, TARGET_PREFER_AVX256):
>         Implement macros to work with -mprefer-vector-width=.
>         * config/i386/i386.opt: Implemented option
>         -mprefer-vector-width=[none|128|256|512].
>         * doc/invoke.texi: Documentation for
>         -mprefer-vector-width=[none|128|256|512].
>
> gcc/testsuite/
>         * g++.dg/ext/pr57362.C (__attribute__): Apply new option syntax.
>         * g++.dg/torture/pr81249.C: Ditto.
>         * gcc.target/i386/avx512f-constant-float-return.c: Ditto.
>         * gcc.target/i386/avx512f-prefer.c: Ditto.
>         * gcc.target/i386/pr82460-2.c: Ditto.
>
> Please merge this patch if you think it is acceptable.
> Thank you
> Sergey

 mprefer-avx128
-Target Report Mask(PREFER_AVX128) Save
-Use 128-bit AVX instructions instead of 256-bit AVX instructions in
the auto-vectorizer.
+Target Undocumented Alias(mprefer-vector-width=, 128, none)

For compatibility, I'd rather leave this option documented with:

+Target Alias(mprefer-vector-width=, 128, 256)

This would mean that in addition to -mprefer-avx128 switching to
128-bit AVX, -mno-prefer-avx128 would switch to 256-bit AVX, as
documented for the option.

The patch is OK, and If you agree, I can commit the patch with the above change.

Thanks,
Uros.

Reply via email to