mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-27 13:54:19 +08:00
i386: -mno-xsave should disable all relevant ISA flags [PR104462]
2022-02-09 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/104462 * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_XSAVE_UNSET): Also include OPTION_MASK_ISA2_AVX2_UNSET. gcc/testsuite/ChangeLog: PR target/104462 * gcc.target/i386/pr104462.c: New test.
This commit is contained in:
parent
2b399dbabd
commit
2f9ab267e7
@ -206,7 +206,8 @@ along with GCC; see the file COPYING3. If not see
|
||||
(OPTION_MASK_ISA_XSAVE | OPTION_MASK_ISA_XSAVEOPT_UNSET \
|
||||
| OPTION_MASK_ISA_XSAVES_UNSET | OPTION_MASK_ISA_XSAVEC_UNSET \
|
||||
| OPTION_MASK_ISA_AVX_UNSET)
|
||||
#define OPTION_MASK_ISA2_XSAVE_UNSET OPTION_MASK_ISA2_AMX_TILE_UNSET
|
||||
#define OPTION_MASK_ISA2_XSAVE_UNSET \
|
||||
(OPTION_MASK_ISA2_AVX2_UNSET | OPTION_MASK_ISA2_AMX_TILE_UNSET)
|
||||
#define OPTION_MASK_ISA_XSAVEOPT_UNSET OPTION_MASK_ISA_XSAVEOPT
|
||||
#define OPTION_MASK_ISA_AVX2_UNSET \
|
||||
(OPTION_MASK_ISA_AVX2 | OPTION_MASK_ISA_AVX512F_UNSET)
|
||||
|
13
gcc/testsuite/gcc.target/i386/pr104462.c
Normal file
13
gcc/testsuite/gcc.target/i386/pr104462.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* PR target/104462 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx512fp16 -mno-xsave" } */
|
||||
|
||||
typedef _Float16 __attribute__((__vector_size__ (8))) F;
|
||||
|
||||
F f;
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
f *= -f;
|
||||
}
|
Loading…
Reference in New Issue
Block a user