]> 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:26:10 +0000 (10:26 +0800)
commit6b9c7da05d43db854e7ae0ee69299d4f290d8dbd
tree3134846f78f69b5b675d7100083276bb95931bb3
parent2b19a1ccbc03cd41038d1e166f28e271fbe88789
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