https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118815
--- Comment #7 from Haochen Jiang <haochen.jiang at intel dot com> --- (In reply to Haochen Jiang from comment #6) > I am testing a patch with this fix: > > " > @@ -2751,10 +2752,11 @@ ix86_option_override_internal (bool main_args_p, > } > > /* Set EVEX512 if one of the following conditions meets: > - 1. AVX512 is enabled while EVEX512 is not explicitly set/unset. > + 1. AVX512 is explicitly enabled while EVEX512 is not explicitly > set/unset. > 2. AVX10.1-512 is enabled. */ > if (TARGET_AVX10_1_512_P (opts->x_ix86_isa_flags2) > || (TARGET_AVX512F_P (opts->x_ix86_isa_flags) > + && (opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_AVX512F) > && !(opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA2_EVEX512))) > opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_EVEX512; This part will cause problem when using -march=xxx, since march is an implicit enable on ISAs. Thus, I will not change here, only changing the condition check on warning. 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, while it will previously. But it is a rare usage. Could we take it?