> From: Dipesh Sharma <[email protected]>
> Sent: Monday, October 26, 2026 11:46 PM
> 
> This patch includes ISA support for AVX10V1AUX.
> 
> In this revision, AVX10.2 implies AVX10V1AUX since all insts are coming from
> AVX10.2.
> Also, no-avx10v1aux implies no-avx10.2.

LGTM for most of them. But with some comments, where PTA thing needs to
be fixed.

> 
> diff --git a/gcc/common/config/i386/cpuinfo.h
> b/gcc/common/config/i386/cpuinfo.h
> index f433810457b9..bc660a803af1 100644
> --- a/gcc/common/config/i386/cpuinfo.h
> +++ b/gcc/common/config/i386/cpuinfo.h
> @@ -1169,13 +1169,20 @@ get_available_features (struct
> __processor_model *cpu_model,
>             set_feature (FEATURE_AVX10V2AUX);
>             avx10v2aux_set = 1;
>           }
> +       if (ecx & bit_AVX10V1AUX)
> +         {
> +           set_feature (FEATURE_AVX10V1AUX);
> +           avx10v1aux_set = 1;
> +         }
>       }
>      }
> 
>    /* Get Advanced Features at level 0x1d (eax = 0x1d).
> -     ACE check must be put after AVX10 check to get AVX10 features.
> -     TODO: Change the condition after AVX10V1AUX is added.  */
> -  if (version >= 2 && avx10v2aux_set && ace_set && max_cpuid_level >=
> 0x1d)
> +     ACE check must be put after AVX10 check to get AVX10 features.  */
> +  if (((avx10v1aux_set && version >= 1) || version >= 2)

Since AVX10.2 implies AVX10_V1_AUX, this could be simplified to
avx10v1_aux_set only, no need to check version also since version >= 1
should always be true. (If you want, you could still keep version >= 1 since
it could guard out version == 0)

> diff --git a/gcc/common/config/i386/i386-common.cc
> b/gcc/common/config/i386/i386-common.cc
> index ed126f4c70dc..a9a34543657e 100644
> --- a/gcc/common/config/i386/i386-common.cc
> +++ b/gcc/common/config/i386/i386-common.cc
> 
> @@ -338,6 +341,8 @@ along with GCC; see the file COPYING3.  If not see
>  #define OPTION_MASK_ISA2_AVX10V2AUX_UNSET \
>    (OPTION_MASK_ISA2_AVX10V2AUX |
> OPTION_MASK_ISA2_ACEV1_UNSET)
>  #define OPTION_MASK_ISA2_ACEV1_UNSET OPTION_MASK_ISA2_ACEV1
> +#define OPTION_MASK_ISA2_AVX10V1AUX_UNSET \
> +  (OPTION_MASK_ISA2_AVX10_2_UNSET |
> OPTION_MASK_ISA2_AVX10V1AUX)

Please put UNSET after the MASK itself in case we need to change it.

> 
>  /* SSE4 includes both SSE4.1 and SSE4.2.  -mno-sse4 should the same
>     as -mno-sse4.1. */
> @@ -1437,6 +1442,21 @@ ix86_handle_option (struct gcc_options *opts,
>       }
>        return true;
> 
> +     case OPT_mavx10v1aux:

Indent seems messed up here.

> diff --git a/gcc/config/i386/i386-isa.def b/gcc/config/i386/i386-isa.def
> index 28835b1d542e..9803ad6b6f11 100644
> --- a/gcc/config/i386/i386-isa.def
> +++ b/gcc/config/i386/i386-isa.def
> @@ -127,3 +127,4 @@ DEF_PTA(AMX_MOVRS)
>  DEF_PTA(AVX512BMM)
>  DEF_PTA(AVX10V2AUX)
>  DEF_PTA(ACEV1)
> +DEF_PTA(AVX10V1AUX)

When you split AVX10V1AUX from AVX10.2 and add new PTA, you should
also add PTA_AVX10V1AUX to those archs using PTA_AVX10_2, or those
arch will break.

Thx,
Haochen

Reply via email to