public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-7573] i386: Properly set ix86_isa_flags Date: Tue, 9 Mar 2021 08:27:07 +0000 (GMT) [thread overview] Message-ID: <20210309082707.7E12E386F41D@sourceware.org> (raw) 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); +}
reply other threads:[~2021-03-09 8:27 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210309082707.7E12E386F41D@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).