]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Do not check vector size conflict when AVX512 is not explicitly set [PR 118815]
authorHaochen Jiang <haochen.jiang@intel.com>
Mon, 10 Feb 2025 08:53:27 +0000 (16:53 +0800)
committerHaochen Jiang <haochen.jiang@intel.com>
Mon, 17 Feb 2025 03:03:39 +0000 (11:03 +0800)
When AVX512 is not explicitly set, we should not take EVEX512 bit into
consideration when checking vector size. It will solve the intrin header
file reporting warnings when compiling with -Wsystem-headers.

However, there is side effect on the usage for '-march=xxx -mavx10.1-256',
where xxx is with AVX512. It will not report warning on vector size for now.
Since it is a rare usage, we will take it.

gcc/ChangeLog:

PR target/118815
* config/i386/i386-options.cc (ix86_option_override_internal):
Do not check vector size conflict when AVX512 is not explicitly
set.

gcc/config/i386/i386-options.cc

index f6c450cc871cdf301d599e981c252c7539b60393..a6eba1ca2b87f821a239e7073b4ba037e6d55ff2 100644 (file)
@@ -2725,6 +2725,7 @@ ix86_option_override_internal (bool main_args_p,
                        "using 512 as max vector size");
        }
       else if (TARGET_AVX512F_P (opts->x_ix86_isa_flags)
+              && (opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_AVX512F)
               && !(OPTION_MASK_ISA2_EVEX512
                    & opts->x_ix86_isa_flags2_explicit))
        warning (0, "Vector size conflicts between AVX10.1 and AVX512, using "