]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Fix behavior for both using AVX10.1-256 in options and function attribute
authorHaochen Jiang <haochen.jiang@intel.com>
Wed, 24 Apr 2024 02:43:18 +0000 (10:43 +0800)
committerHaochen Jiang <haochen.jiang@intel.com>
Wed, 24 Apr 2024 07:21:27 +0000 (15:21 +0800)
commitd279c9d89b2f6ce89c1eec0ff4b980e9c5f51fd1
tree26fec9865d8a50df7cd5722f1f6554bafcfe3b54
parentf952745943c2e9fbb2df32d2f2b037669d3fc50f
i386: Fix behavior for both using AVX10.1-256 in options and function attribute

When we are using -mavx10.1-256 in command line and avx10.1-256 in
target attribute together, zmm should never be generated. But current
GCC will generate zmm since it wrongly enables EVEX512 for non-explicitly
set AVX512. This patch will fix that issue.

gcc/ChangeLog:

* config/i386/i386-options.cc (ix86_valid_target_attribute_tree):
Check whether AVX512F is explicitly enabled.

gcc/testsuite/ChangeLog:

* gcc.target/i386/avx10_1-24.c: New test.
gcc/config/i386/i386-options.cc
gcc/testsuite/gcc.target/i386/avx10_1-24.c [new file with mode: 0644]