diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-11-14 09:15:31 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-11-14 09:15:31 +0100 |
commit | aa16689ea76811f6dbd44bcc8ae4b5a6611e18b5 (patch) | |
tree | 56757441d566a6d3d61488196120a8669dce81e1 /gcc/config | |
parent | bedb7f045f3bc4ccf17f4b58f840c93acb821a3f (diff) | |
download | gcc-aa16689ea76811f6dbd44bcc8ae4b5a6611e18b5.zip gcc-aa16689ea76811f6dbd44bcc8ae4b5a6611e18b5.tar.gz gcc-aa16689ea76811f6dbd44bcc8ae4b5a6611e18b5.tar.bz2 |
i386-options.c (ix86_omp_device_kind_arch_isa): Don't change sse4.2 to sse4_2 and sse4.1 to sse4.1.
* config/i386/i386-options.c (ix86_omp_device_kind_arch_isa): Don't
change sse4.2 to sse4_2 and sse4.1 to sse4.1.
* config/i386/t-omp-device (omp-device-properties-i386): Likewise.
* c-c++-common/gomp/declare-variant-11.c: Add "sse4.2" and "sse4.1"
test.
From-SVN: r278205
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386-options.c | 10 | ||||
-rw-r--r-- | gcc/config/i386/t-omp-device | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/gcc/config/i386/i386-options.c b/gcc/config/i386/i386-options.c index b082228..7470013 100644 --- a/gcc/config/i386/i386-options.c +++ b/gcc/config/i386/i386-options.c @@ -316,19 +316,13 @@ ix86_omp_device_kind_arch_isa (enum omp_device_kind_arch_isa trait, HOST_WIDE_INT mask = i ? ix86_isa_flags2 : ix86_isa_flags; for (size_t n = 0; n < nopts; n++) { - const char *option = opts[n].option + 2; - /* -msse4.2 and -msse4.1 options contain dot, which is not valid - in identifiers. Use underscore instead, and handle sse4 - as an alias to sse4_2. */ + /* Handle sse4 as an alias to sse4.2. */ if (opts[n].mask == OPTION_MASK_ISA_SSE4_2) { - option = "sse4_2"; if (strcmp (name, "sse4") == 0) return (mask & opts[n].mask) != 0 ? 1 : -1; } - else if (opts[n].mask == OPTION_MASK_ISA_SSE4_1) - option = "sse4_1"; - if (strcmp (name, option) == 0) + if (strcmp (name, opts[n].option + 2) == 0) return (mask & opts[n].mask) != 0 ? 1 : -1; } } diff --git a/gcc/config/i386/t-omp-device b/gcc/config/i386/t-omp-device index 26de162..037ae5e1 100644 --- a/gcc/config/i386/t-omp-device +++ b/gcc/config/i386/t-omp-device @@ -3,4 +3,4 @@ omp-device-properties-i386: $(srcdir)/config/i386/i386-options.c echo arch: x86 x86_64 i386 i486 i586 i686 ia32 >> $@ echo isa: sse4 `sed -n '/^static struct ix86_target_opts isa2\?_opts\[\] =/,/^};/p' \ $(srcdir)/config/i386/i386-options.c | \ - sed -n 's/",.*$$//;s/\./_/;s/^ { "-m//p'` >> $@ + sed -n 's/",.*$$//;s/^ { "-m//p'` >> $@ |