https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119617
--- Comment #10 from Haochen Jiang <haochen.jiang at intel dot com> ---
(In reply to Haochen Jiang from comment #9)
> Proposed change:
>
> diff --git a/gcc/config/i386/i386-options.cc
> b/gcc/config/i386/i386-options.cc
> index a9fac011f3d..789c1f1ae54 100644
> --- a/gcc/config/i386/i386-options.cc
> +++ b/gcc/config/i386/i386-options.cc
> @@ -2775,6 +2775,12 @@ ix86_option_override_internal (bool main_args_p,
> opts->x_ix86_isa_flags2 |= avx512_isa_flags2;
> }
>
> + /* Reject -mno-evex512 if AVX512VL is not enabled. */
> + if (!TARGET_EVEX512_P (opts->x_ix86_isa_flags2)
> + && (OPTION_MASK_ISA2_EVEX512 & opts->x_ix86_isa_flags2_explicit)
> + && !TARGET_AVX512VL_P (opts->x_ix86_isa_flags))
> + error ("%<-mno-evex512%> could not be used if AVX512VL is not enabled");
> +
> /* Validate -mpreferred-stack-boundary= value or default it to
> PREFERRED_STACK_BOUNDARY_DEFAULT. */
> ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT;
I forgot that we have something like this in intrin file:
#if !defined (__AVX512F__) || defined (__EVEX512__)
#pragma GCC push_options
#pragma GCC target("avx512f,no-evex512")
#define __DISABLE_AVX512F__
#endif /* __AVX512F__ */
Thus, we could not reject no-evex512. Maybe a simple workaround under
standard_sse_constant_opcode is a better temporary way for both GCC 14 and GCC
15.