public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-7573] i386: Properly set ix86_isa_flags
@ 2021-03-09 8:27 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-03-09 8:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:eb5e1998e29873ba77deff357dc27e8cef53dff0
commit r11-7573-geb5e1998e29873ba77deff357dc27e8cef53dff0
Author: Martin Liska <mliska@suse.cz>
Date: Mon Mar 8 12:56:06 2021 +0100
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.
Diff:
---
gcc/config/i386/i386-options.c | 8 ++++----
gcc/testsuite/gcc.target/i386/pr99464.c | 15 +++++++++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/gcc/config/i386/i386-options.c b/gcc/config/i386/i386-options.c
index 410fa0cc436..e93935f6f2c 100644
--- a/gcc/config/i386/i386-options.c
+++ b/gcc/config/i386/i386-options.c
@@ -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;
diff --git a/gcc/testsuite/gcc.target/i386/pr99464.c b/gcc/testsuite/gcc.target/i386/pr99464.c
new file mode 100644
index 00000000000..98dd938973e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr99464.c
@@ -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);
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-09 8:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 8:27 [gcc r11-7573] i386: Properly set ix86_isa_flags Martin Liska
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).