On Wed, Nov 15, 2017 at 5:59 PM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Wed, Nov 15, 2017 at 8:09 AM, Uros Bizjak <ubiz...@gmail.com> wrote: >> On Wed, Nov 15, 2017 at 2:37 PM, H.J. Lu <hjl.to...@gmail.com> wrote: >>> -mzeroupper is specified to generate vzeroupper instruction. If it >>> isn't used, the default should depend on !TARGET_AVX512ER. Users can >>> always use -mzeroupper or -mno-zeroupper to override it. >>> >>> Sebastian, can you run the full test with it? >>> >>> OK for trunk if there is no regression? >> >> If we want to go this way, please add relevant tune flag (e.g. >> X86_TUNE_EMIT_VZEROUPPER) and use it for ~m_KNL. This tune is the >> property of the processor model, not ISA. > > How about this? OK for trunk if there are no regressions?
> gcc/ > > PR target/82990 > * config/i386/i386.c (pass_insert_vzeroupper::gate): Remove > TARGET_AVX512ER check. > (ix86_option_override_internal): Set MASK_VZEROUPPER if > neither -mzeroupper nor -mno-zeroupper is used and > TARGET_EMIT_VZEROUPPER is set. > * config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New. > * config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER. > > gcc/testsuite/ > > PR target/82990 > * gcc.target/i386/pr82942-2.c: Add -mtune=knl. > * gcc.target/i386/pr82990-1.c: New test. > * gcc.target/i386/pr82990-2.c: Likewise. > * gcc.target/i386/pr82990-3.c: Likewise. > * gcc.target/i386/pr82990-4.c: Likewise. > * gcc.target/i386/pr82990-5.c: Likewise. > * gcc.target/i386/pr82990-6.c: Likewise. > * gcc.target/i386/pr82990-7.c: Likewise. OK. Thanks, Uros.