]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Decouple AMX-AVX512 from AVX10.2 and imply AVX512F
authorHaochen Jiang <haochen.jiang@intel.com>
Tue, 15 Jul 2025 02:44:54 +0000 (10:44 +0800)
committerHaochen Jiang <haochen.jiang@intel.com>
Wed, 16 Jul 2025 02:28:32 +0000 (10:28 +0800)
commit426e9cf512f439d3b97ee450a87f67f65c545c50
tree7e7d14010d0c45b77ec41badf50e7166b20ad7b8
parent3de4de2511d066bc832878f0571743a476e048eb
i386: Decouple AMX-AVX512 from AVX10.2 and imply AVX512F

In ISE058, the AVX10.2 imply is removed from AMX-AVX512. This
leads to re-consideration on the imply for AMX-AVX512.

Since it is using zmm register and using zmm register only, we
need to at least imply AVX512F. AVX512VL is not needed.

On the other hand, if we imply AVX10.1 for AMX-AVX512, it will
cause -mno-avx10.1 disabling AMX-AVX512. This would be a surprise
for users.

Based on the two reasons above, the patch is decoupling AMX-AVX512
from AVX10.2 and imply AVX512F.

gcc/ChangeLog:

* common/config/i386/i386-common.cc
(OPTION_MASK_ISA2_AMX_AVX512_SET): Do not set AVX10.2.
(OPTION_MASK_ISA2_AVX10_2_UNSET): Remove AMX-AVX512 unset.
(OPTION_MASK_ISA2_AVX512F_UNSET): Unset AMX-AVX512.
(ix86_handle_option): Imply AVX512F for AMX-AVX512.

gcc/testsuite/ChangeLog:

* gcc.target/i386/amxavx512-cvtrowd2ps-2.c: Add -mavx512fp16 to
use FP16 related intrins for convert.
* gcc.target/i386/amxavx512-cvtrowps2bf16-2.c: Ditto.
* gcc.target/i386/amxavx512-cvtrowps2ph-2.c: Ditto.
* gcc.target/i386/amxavx512-movrow-2.c: Ditto.
gcc/common/config/i386/i386-common.cc
gcc/testsuite/gcc.target/i386/amxavx512-cvtrowd2ps-2.c
gcc/testsuite/gcc.target/i386/amxavx512-cvtrowps2bf16-2.c
gcc/testsuite/gcc.target/i386/amxavx512-cvtrowps2ph-2.c
gcc/testsuite/gcc.target/i386/amxavx512-movrow-2.c