2019-11-14 Jakub Jelinek <jakub@redhat.com>
+ * 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.
+
* omp-general.c (omp_context_name_list_prop): New function.
(omp_context_selector_matches): Use it. Return 0 if it returns
NULL.
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;
}
}
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'` >> $@
2019-11-14 Jakub Jelinek <jakub@redhat.com>
+ * c-c++-common/gomp/declare-variant-11.c: Add "sse4.2" and "sse4.1"
+ test.
+
* c-c++-common/gomp/declare-variant-2.c: Add test for non-integral
score and for negative score.
* c-c++-common/gomp/declare-variant-3.c: Add test for zero score.
void f06 (void);
void f07 (void);
void f08 (void);
-#pragma omp declare variant (f07) match (device={isa(sse4,sse3,"avx")})
+#pragma omp declare variant (f07) match (device={isa(sse4,"sse4.1","sse4.2",sse3,"avx")})
#pragma omp declare variant (f08) match (device={isa("avx",sse3)})
void f09 (void);
void f10 (void);