]> git.ipfire.org Git - thirdparty/gcc.git/commit
target/119549 - fixup handling of -mno-sse4 in target attribute
authorRichard Biener <rguenther@suse.de>
Mon, 31 Mar 2025 12:56:25 +0000 (14:56 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 1 Apr 2025 08:31:21 +0000 (10:31 +0200)
commitae2912748b9913fe9cd198db1b3fa704d0cbc728
tree68b42232e6e15e263da2b3f26279bf72dbaeb5c0
parentde92ac6f11e605987421fe1443b5b81ff172dbb6
target/119549 - fixup handling of -mno-sse4 in target attribute

The following fixes ix86_valid_target_attribute_inner_p to properly
handle target("no-sse4") via OPT_mno_sse4 rather than as unset OPT_msse4.
I've added asserts to ix86_handle_option that RejectNegative is honored
for both.

PR target/119549
* common/config/i386/i386-common.cc (ix86_handle_option):
Assert that both OPT_msse4 and OPT_mno_sse4 are never unset.
* config/i386/i386-options.cc (ix86_valid_target_attribute_inner_p):
Process negated OPT_msse4 as OPT_mno_sse4.

* gcc.target/i386/pr119549.c: New testcase.
gcc/common/config/i386/i386-common.cc
gcc/config/i386/i386-options.cc
gcc/testsuite/gcc.target/i386/pr119549.c [new file with mode: 0644]