public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2
@ 2022-03-21 14:52 hjl.tools at gmail dot com
2022-03-21 14:58 ` [Bug target/105000] " hjl.tools at gmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-21 14:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
Bug ID: 105000
Summary: __attribute__((target("no-sse"))) doesn't disable
AVX/SSE ISAs in ix86_isa_flags2
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
CC: crazylht at gmail dot com
Target Milestone: ---
Target: x86-64
[hjl@gnu-tgl-3 gcc]$ cat /tmp/x.c
#include <x86gprintrin.h>
__attribute__((target("no-mmx,no-sse")))
int
foo ()
{
return _get_ssp ();
}
[hjl@gnu-tgl-3 gcc]$ ./xgcc -B./ -S -O2 x.c -mshstk -mavxvnni
x.c: In function ‘foo’:
x.c:5:1: error: inlining failed in call to ‘always_inline’ ‘_get_ssp’: target
specific option mismatch
5 | _get_ssp (void)
| ^~~~~~~~
x.c:15:10: note: called from here
15 | return _get_ssp ();
| ^~~~~~~~~~~
[hjl@gnu-tgl-3 gcc]$ ./xgcc -B./ -S -O2 x.c -mshstk -mkl
x.c: In function ‘foo’:
x.c:5:1: error: inlining failed in call to ‘always_inline’ ‘_get_ssp’: target
specific option mismatch
5 | _get_ssp (void)
| ^~~~~~~~
x.c:15:10: note: called from here
15 | return _get_ssp ();
| ^~~~~~~~~~~
[hjl@gnu-tgl-3 gcc]$
Is is because __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs
in ix86_isa_flags2.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/105000] __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2
2022-03-21 14:52 [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 hjl.tools at gmail dot com
@ 2022-03-21 14:58 ` hjl.tools at gmail dot com
2022-03-21 22:35 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-21 14:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
#define OPTION_MASK_ISA2_AVX5124FMAPS (HOST_WIDE_INT_1U << 3)
#define OPTION_MASK_ISA2_AVX5124VNNIW (HOST_WIDE_INT_1U << 4)
#define OPTION_MASK_ISA2_AVX512BF16 (HOST_WIDE_INT_1U << 5)
#define OPTION_MASK_ISA2_AVX512FP16 (HOST_WIDE_INT_1U << 6)
#define OPTION_MASK_ISA2_AVX512VP2INTERSECT (HOST_WIDE_INT_1U << 7)
#define OPTION_MASK_ISA2_AVXVNNI (HOST_WIDE_INT_1U << 8)
#define OPTION_MASK_ISA2_KL (HOST_WIDE_INT_1U << 15)
#define OPTION_MASK_ISA2_WIDEKL (HOST_WIDE_INT_1U << 30)
#define OPTION_MASK_ISA2_VAES (HOST_WIDE_INT_1U << 27)
should be disable by __attribute__((target("no-sse"))).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/105000] __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2
2022-03-21 14:52 [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 hjl.tools at gmail dot com
2022-03-21 14:58 ` [Bug target/105000] " hjl.tools at gmail dot com
@ 2022-03-21 22:35 ` cvs-commit at gcc dot gnu.org
2022-03-22 8:40 ` [Bug target/105000] __attribute__((target("general-regs-only"))) " marxin at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-21 22:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:e8b6afa98f0a390c955a089a3d61fdd24f4e1d3a
commit r12-7745-ge8b6afa98f0a390c955a089a3d61fdd24f4e1d3a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 21 11:45:59 2022 -0700
x86: Disable SSE in ISA2 for -mgeneral-regs-only
Replace OPTION_MASK_ISA2_AVX512F_UNSET with OPTION_MASK_ISA2_SSE_UNSET
in OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET to disable SSE, AVX and
AVX512 ISAs.
gcc/
PR target/105000
* common/config/i386/i386-common.cc
(OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Replace
OPTION_MASK_ISA2_AVX512F_UNSET with OPTION_MASK_ISA2_SSE_UNSET.
gcc/testsuite/
PR target/105000
* gcc.target/i386/pr105000-1.c: New test.
* gcc.target/i386/pr105000-2.c: Likewise.
* gcc.target/i386/pr105000-3.c: Likewise.
* gcc.target/i386/pr105000-4.c: Likewise.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/105000] __attribute__((target("general-regs-only"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2
2022-03-21 14:52 [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 hjl.tools at gmail dot com
2022-03-21 14:58 ` [Bug target/105000] " hjl.tools at gmail dot com
2022-03-21 22:35 ` cvs-commit at gcc dot gnu.org
@ 2022-03-22 8:40 ` marxin at gcc dot gnu.org
2022-03-22 9:37 ` crazylht at gmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-22 8:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Can we close it as fixed?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/105000] __attribute__((target("general-regs-only"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2
2022-03-21 14:52 [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 hjl.tools at gmail dot com
` (2 preceding siblings ...)
2022-03-22 8:40 ` [Bug target/105000] __attribute__((target("general-regs-only"))) " marxin at gcc dot gnu.org
@ 2022-03-22 9:37 ` crazylht at gmail dot com
2022-03-22 9:38 ` marxin at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: crazylht at gmail dot com @ 2022-03-22 9:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Martin Liška from comment #3)
> Can we close it as fixed?
I think so.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/105000] __attribute__((target("general-regs-only"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2
2022-03-21 14:52 [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 hjl.tools at gmail dot com
` (3 preceding siblings ...)
2022-03-22 9:37 ` crazylht at gmail dot com
@ 2022-03-22 9:38 ` marxin at gcc dot gnu.org
2022-03-22 14:26 ` hjl.tools at gmail dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-22 9:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed then.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/105000] __attribute__((target("general-regs-only"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2
2022-03-21 14:52 [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 hjl.tools at gmail dot com
` (4 preceding siblings ...)
2022-03-22 9:38 ` marxin at gcc dot gnu.org
@ 2022-03-22 14:26 ` hjl.tools at gmail dot com
2022-03-22 16:31 ` cvs-commit at gcc dot gnu.org
2022-03-22 16:32 ` hjl.tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-22 14:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Ever confirmed|0 |1
Last reconfirmed| |2022-03-22
Resolution|FIXED |---
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
GCC 11 isn't fixed yet.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/105000] __attribute__((target("general-regs-only"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2
2022-03-21 14:52 [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 hjl.tools at gmail dot com
` (5 preceding siblings ...)
2022-03-22 14:26 ` hjl.tools at gmail dot com
@ 2022-03-22 16:31 ` cvs-commit at gcc dot gnu.org
2022-03-22 16:32 ` hjl.tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-22 16:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:f45603f39ba167dd0ea1b002c96ddccbfe2b4b2f
commit r11-9686-gf45603f39ba167dd0ea1b002c96ddccbfe2b4b2f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 21 11:45:59 2022 -0700
x86: Disable SSE in ISA2 for -mgeneral-regs-only
Replace OPTION_MASK_ISA2_AVX512F_UNSET with OPTION_MASK_ISA2_SSE_UNSET
in OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET to disable SSE, AVX and
AVX512 ISAs.
gcc/
PR target/105000
* common/config/i386/i386-common.c
(OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Replace
OPTION_MASK_ISA2_AVX512F_UNSET with OPTION_MASK_ISA2_SSE_UNSET.
gcc/testsuite/
PR target/105000
* gcc.target/i386/pr105000-1.c: New test.
* gcc.target/i386/pr105000-2.c: Likewise.
* gcc.target/i386/pr105000-3.c: Likewise.
(cherry picked from commit e8b6afa98f0a390c955a089a3d61fdd24f4e1d3a)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/105000] __attribute__((target("general-regs-only"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2
2022-03-21 14:52 [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 hjl.tools at gmail dot com
` (6 preceding siblings ...)
2022-03-22 16:31 ` cvs-commit at gcc dot gnu.org
@ 2022-03-22 16:32 ` hjl.tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-22 16:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |11.3
--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for GCC 12 and GCC 11.3.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-03-22 16:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 14:52 [Bug target/105000] New: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 hjl.tools at gmail dot com
2022-03-21 14:58 ` [Bug target/105000] " hjl.tools at gmail dot com
2022-03-21 22:35 ` cvs-commit at gcc dot gnu.org
2022-03-22 8:40 ` [Bug target/105000] __attribute__((target("general-regs-only"))) " marxin at gcc dot gnu.org
2022-03-22 9:37 ` crazylht at gmail dot com
2022-03-22 9:38 ` marxin at gcc dot gnu.org
2022-03-22 14:26 ` hjl.tools at gmail dot com
2022-03-22 16:31 ` cvs-commit at gcc dot gnu.org
2022-03-22 16:32 ` hjl.tools at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).