]> 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, 22 Apr 2025 12:51:03 +0000 (14:51 +0200)
commita27f6a420c61f35d44bf33561b8312e1dbd012c8
tree5ee6a624c958b612709dd82d7af2d5a05add0cd4
parent97dde4260ca1bf841be0e7565962670a30d45fd2
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.

(cherry picked from commit ae2912748b9913fe9cd198db1b3fa704d0cbc728)
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]