mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 18:20:51 +08:00
i386: Properly set ix86_isa_flags
gcc/ChangeLog: PR target/99464 * config/i386/i386-options.c (ix86_option_override_internal): Set isa_flags for OPTS argument and not for the global global_options. gcc/testsuite/ChangeLog: PR target/99464 * gcc.target/i386/pr99464.c: New test.
This commit is contained in:
parent
e5cdf6968b
commit
eb5e1998e2
@ -2159,11 +2159,11 @@ ix86_option_override_internal (bool main_args_p,
|
||||
&& !(opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA2_MOVBE))
|
||||
opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_MOVBE;
|
||||
if (((processor_alias_table[i].flags & PTA_AES) != 0)
|
||||
&& !(ix86_isa_flags_explicit & OPTION_MASK_ISA_AES))
|
||||
ix86_isa_flags |= OPTION_MASK_ISA_AES;
|
||||
&& !(opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_AES))
|
||||
opts->x_ix86_isa_flags |= OPTION_MASK_ISA_AES;
|
||||
if (((processor_alias_table[i].flags & PTA_SHA) != 0)
|
||||
&& !(ix86_isa_flags_explicit & OPTION_MASK_ISA_SHA))
|
||||
ix86_isa_flags |= OPTION_MASK_ISA_SHA;
|
||||
&& !(opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_SHA))
|
||||
opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SHA;
|
||||
if (((processor_alias_table[i].flags & PTA_PCLMUL) != 0)
|
||||
&& !(opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_PCLMUL))
|
||||
opts->x_ix86_isa_flags |= OPTION_MASK_ISA_PCLMUL;
|
||||
|
15
gcc/testsuite/gcc.target/i386/pr99464.c
Normal file
15
gcc/testsuite/gcc.target/i386/pr99464.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* PR target/99464 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
#pragma GCC target("arch=cannonlake")
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
volatile __m128i x;
|
||||
|
||||
void extern
|
||||
sha_test (void)
|
||||
{
|
||||
x = _mm_sha1msg1_epu32 (x, x);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user