From 190667ae2509700bc2ddda4be0934249bdd30e9c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 14 Oct 2018 20:30:02 +0000 Subject: [PATCH] i386: Also disable AVX512IFMA/AVX5124FMAPS/AVX5124VNNIW Also disable AVX512IFMA, AVX5124FMAPS and AVX5124VNNIW when disabling AVX512F. gcc/ PR target/87572 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET): Add OPTION_MASK_ISA_AVX512IFMA_UNSET, OPTION_MASK_ISA_AVX5124FMAPS_UNSET and OPTION_MASK_ISA_AVX5124VNNIW_UNSET. gcc/testsuite/ PR target/87572 * gcc.target/i386/pr87572.c: New test. From-SVN: r265150 --- gcc/ChangeLog | 8 ++++++++ gcc/common/config/i386/i386-common.c | 8 ++++++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr87572.c | 10 ++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr87572.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 49770e78a85..e6c6dbcbcad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-10-14 H.J. Lu + + PR target/87572 + * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET): + Add OPTION_MASK_ISA_AVX512IFMA_UNSET, + OPTION_MASK_ISA_AVX5124FMAPS_UNSET and + OPTION_MASK_ISA_AVX5124VNNIW_UNSET. + 2018-10-13 Eric Botcazou * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh. diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index 3b5312d7250..36ef999df83 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -194,8 +194,12 @@ along with GCC; see the file COPYING3. If not see (OPTION_MASK_ISA_AVX512F | OPTION_MASK_ISA_AVX512CD_UNSET \ | OPTION_MASK_ISA_AVX512PF_UNSET | OPTION_MASK_ISA_AVX512ER_UNSET \ | OPTION_MASK_ISA_AVX512DQ_UNSET | OPTION_MASK_ISA_AVX512BW_UNSET \ - | OPTION_MASK_ISA_AVX512VL_UNSET | OPTION_MASK_ISA_AVX512VBMI2_UNSET \ - | OPTION_MASK_ISA_AVX512VNNI_UNSET | OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET \ + | OPTION_MASK_ISA_AVX512VL_UNSET | OPTION_MASK_ISA_AVX512IFMA_UNSET \ + | OPTION_MASK_ISA_AVX5124FMAPS_UNSET \ + | OPTION_MASK_ISA_AVX5124VNNIW_UNSET \ + | OPTION_MASK_ISA_AVX512VBMI2_UNSET \ + | OPTION_MASK_ISA_AVX512VNNI_UNSET \ + | OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET \ | OPTION_MASK_ISA_AVX512BITALG_UNSET) #define OPTION_MASK_ISA_AVX512CD_UNSET OPTION_MASK_ISA_AVX512CD #define OPTION_MASK_ISA_AVX512PF_UNSET OPTION_MASK_ISA_AVX512PF diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ad5c0e17eb7..d8fbbccabe5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-10-14 H.J. Lu + + PR target/87572 + * gcc.target/i386/pr87572.c: New test. + 2018-10-14 Paul Thomas PR fortran/83146 diff --git a/gcc/testsuite/gcc.target/i386/pr87572.c b/gcc/testsuite/gcc.target/i386/pr87572.c new file mode 100644 index 00000000000..ea1beb78f5c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr87572.c @@ -0,0 +1,10 @@ +/* PR target/82483 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -mavx512ifma -mno-sse2 -w -Wno-psabi" } */ + +typedef long long __m512i __attribute__((__vector_size__(64))); +__m512i +foo (__m512i c, __m512i d, __m512i e, int b) +{ + return __builtin_ia32_vpmadd52huq512_maskz (c, d, e, b); /* { dg-error "incompatible types" } */ +} -- 2.30.2