https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121606

--- Comment #10 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 20 Aug 2025, haochen.jiang at intel dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121606
> 
> --- Comment #8 from Haochen Jiang <haochen.jiang at intel dot com> ---
> (In reply to Haochen Jiang from comment #6)
> > (In reply to rguent...@suse.de from comment #5)
> > > 
> > > doesn't diagnose it.  And I wouldn't have expected a diagnostic for this
> > > as -mavx10.1 should simply re-enable avx512fp16?
> > 
> > Hmm you are right here. Let me have a look on that.
> 
> Correction here, it should be expected a warning here for GCC15 since it is 
> not
> a simple re-enable at that time where we still take them as separate features.
> 
> Trunk should w/o that warning.

Ah yes, I tested trunk.  On the branch indeed I see

> ../../gcc15-g/gcc/cc1 -quiet t.c -mno-avx512fp16 -mavx10.1
cc1: warning: ‘-mavx10.1’ is aliased to 512 bit since GCC14.3 and GCC15.1 
while ‘-mavx10.1-256’ and ‘-mavx10.1-512’ will be deprecated in GCC 16 due 
to all machines 512 bit vector size supported
cc1: warning: ‘-mno-evex512’ or ‘-mno-avx512XXX’ cannot disable AVX10 
instructions when AVX10.1-512 is available in GCC 15, behavior will change 
to it will disable that part of AVX512 instructions since GCC 16

and

> ../../gcc15-g/gcc/cc1 -quiet t.c -mavx10.1
cc1: warning: ‘-mavx10.1’ is aliased to 512 bit since GCC14.3 and GCC15.1 
while ‘-mavx10.1-256’ and ‘-mavx10.1-512’ will be deprecated in GCC 16 due 
to all machines 512 bit vector size supported

I wonder how at least the warning about using -mavx10.1 makes sense
given it says it enables 512bits which is the same behavior as in
GCC 16?  The same diagnostic is in -mavx10.1-256 which is even more
confusing?  I belive we should make -mavx10.1-512 not an Alias
and put the diagnostic there, not on -mavx10.1 uses?

For the diagnostic about -mno-evex512 the confusing thing is that
this option wasn't specified.  The behavior of -mno-avx512fp16
shouldn't change, and specifically adding -mavx10.1 (_not_
-mavx10.1-256) should simply re-enable it.  With
-mno-avx512fp16 -mavx10.1-256 it should, in 15, re-enable only
the 256 bit part of avx512fp16 obviously.

Reply via email to