]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert "Emit a warning when AVX10 options conflict in vector width"
authorHaochen Jiang <haochen.jiang@intel.com>
Thu, 24 Aug 2023 06:38:01 +0000 (14:38 +0800)
committerHaochen Jiang <haochen.jiang@intel.com>
Thu, 24 Aug 2023 06:38:01 +0000 (14:38 +0800)
This reverts commit 26a820dc136b00b4dc37609429576b6a914cb572.

gcc/common/config/i386/i386-common.cc
gcc/config/i386/driver-i386.cc
gcc/testsuite/gcc.target/i386/avx10_1-15.c [deleted file]
gcc/testsuite/gcc.target/i386/avx10_1-16.c [deleted file]
gcc/testsuite/gcc.target/i386/avx10_1-17.c [deleted file]
gcc/testsuite/gcc.target/i386/avx10_1-18.c [deleted file]

index 1e11163004b73698ab9def0d77a7afcf6a9ef8f1..7c4a87a454d72864abc69f7174ee43200219d116 100644 (file)
@@ -428,24 +428,6 @@ ix86_check_avx512 (struct gcc_options *opts)
   return true;
 }
 
-/* Emit a warning when there is a conflict vector width in AVX10 options.  */
-static void
-ix86_check_avx10_vector_width (struct gcc_options *opts, bool avx10_max_512)
-{
-  if (avx10_max_512)
-    {
-      if (((opts->x_ix86_isa_flags2 | ~OPTION_MASK_ISA2_AVX10_512BIT)
-          == ~OPTION_MASK_ISA2_AVX10_512BIT)
-         && (opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA2_AVX10_512BIT))
-       warning (0, "The options used for AVX10 have conflict vector width, "
-                "using the latter 512 as vector width");
-    }
-  else if (opts->x_ix86_isa_flags2 & opts->x_ix86_isa_flags2_explicit
-          & OPTION_MASK_ISA2_AVX10_512BIT)
-    warning (0, "The options used for AVX10 have conflict vector width, "
-            "using the latter 256 as vector width");
-}
-
 /* Implement TARGET_HANDLE_OPTION.  */
 
 bool
@@ -1433,7 +1415,6 @@ ix86_handle_option (struct gcc_options *opts,
       return true;
 
     case OPT_mavx10_1_256:
-      ix86_check_avx10_vector_width (opts, false);
       opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10_1_SET;
       opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_AVX10_1_SET;
       opts->x_ix86_isa_flags2 &= ~OPTION_MASK_ISA2_AVX10_512BIT_SET;
@@ -1443,7 +1424,6 @@ ix86_handle_option (struct gcc_options *opts,
       return true;
 
     case OPT_mavx10_1_512:
-      ix86_check_avx10_vector_width (opts, true);
       opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10_1_SET;
       opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_AVX10_1_SET;
       opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10_512BIT_SET;
index f4551a74e3abc9edd2d049023a16bac8ba457ac3..227ace6ff83bc8f4930aa7483a347cb6d3c715e4 100644 (file)
@@ -854,8 +854,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
                  options = concat (options, " ",
                                    isa_names_table[i].option, NULL);
              }
-           else if ((isa_names_table[i].feature != FEATURE_AVX10_1)
-                    && (isa_names_table[i].feature != FEATURE_AVX10_512BIT))
+           else if (isa_names_table[i].feature != FEATURE_AVX10_1)
              options = concat (options, neg_option,
                                isa_names_table[i].option + 2, NULL);
          }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-15.c b/gcc/testsuite/gcc.target/i386/avx10_1-15.c
deleted file mode 100644 (file)
index fd873c9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -march=x86-64 -mavx10.1-512 -mavx10.1-256" } */
-/* { dg-warning "The options used for AVX10 have conflict vector width, using the latter 256 as vector width" "" { target *-*-* } 0 } */
-
-#include "avx10_1-1.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-16.c b/gcc/testsuite/gcc.target/i386/avx10_1-16.c
deleted file mode 100644 (file)
index 1e664eb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -mavx10.1-256 -mavx10.1-512" } */
-/* { dg-warning "The options used for AVX10 have conflict vector width, using the latter 512 as vector width" "" { target *-*-* } 0 } */
-
-#include "avx10_1-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-17.c b/gcc/testsuite/gcc.target/i386/avx10_1-17.c
deleted file mode 100644 (file)
index 7dfff3a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2" } */
-
-#include <immintrin.h>
-
-__attribute__ ((target ("avx10.1-512,avx10.1-256"))) void
-f1 ()
-{ /* { dg-warning "The options used for AVX10 have conflict vector width, using the latter 256 as vector width" } */
-  register __m256d a __asm ("ymm17");
-  register __m256d b __asm ("ymm16");
-  a = _mm256_add_pd (a, b);
-  asm volatile ("" : "+v" (a));
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-18.c b/gcc/testsuite/gcc.target/i386/avx10_1-18.c
deleted file mode 100644 (file)
index 955cca1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-march=x86-64" } */
-/* { dg-final { scan-assembler "%zmm" } } */
-
-typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
-
-__attribute__ ((target ("avx10.1-256,avx10.1-512"))) __m512d
-foo ()
-{ /* { dg-warning "The options used for AVX10 have conflict vector width, using the latter 512 as vector width" } */
-  __m512d a, b;
-  a = a + b;
-  return a;
-}