aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-01-30 10:52:57 +0100
committerJakub Jelinek <jakub@redhat.com>2021-01-30 10:52:57 +0100
commit25f303e9a27a0d799f9979446d9f11ed62b8d648 (patch)
tree642452a94ce90dbf36f986dfaed02bed39e99890
parent2900f2f2c5fb234678eb8b76564e5994ec5970b9 (diff)
downloadgcc-25f303e9a27a0d799f9979446d9f11ed62b8d648.zip
gcc-25f303e9a27a0d799f9979446d9f11ed62b8d648.tar.gz
gcc-25f303e9a27a0d799f9979446d9f11ed62b8d648.tar.bz2
testsuite: Fix up gomp/simd-{2,3}.c tests [PR98243]
The test (intentionally) is not gcc.dg/vect/, as it needs -fopenmp and uses OpenMP directives other than simd and therefore can't rely on default VECTFLAGS and so I think can't safely use vect_int effective target either. So, I'm just making sure it is vectorized on x86 and on aarch64 (the latter as an example of a target that doesn't need any extra options to get the vectorization). 2021-01-30 Jakub Jelinek <jakub@redhat.com> PR testsuite/98243 * gcc.dg/gomp/simd-2.c: Add -msse2 on x86. Restrict scan-tree-dump-times to x86 and aarch64 targets. * gcc.dg/gomp/simd-3.c: Likewise.
-rw-r--r--gcc/testsuite/gcc.dg/gomp/simd-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/gomp/simd-3.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/simd-2.c b/gcc/testsuite/gcc.dg/gomp/simd-2.c
index 7ac3eb4..85acb98 100644
--- a/gcc/testsuite/gcc.dg/gomp/simd-2.c
+++ b/gcc/testsuite/gcc.dg/gomp/simd-2.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-vect-details" } */
+/* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-additional-options "-mavx" { target avx } } */
-/* { dg-final { scan-tree-dump-times "vectorized \[1-9]\[0-9]* loops in function" 5 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized \[1-9]\[0-9]* loops in function" 5 "vect" { target i?86-*-* x86_64-*-* aarch64-*-* } } } */
int a[10000][128];
diff --git a/gcc/testsuite/gcc.dg/gomp/simd-3.c b/gcc/testsuite/gcc.dg/gomp/simd-3.c
index 13e1346..86fee85 100644
--- a/gcc/testsuite/gcc.dg/gomp/simd-3.c
+++ b/gcc/testsuite/gcc.dg/gomp/simd-3.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-vect-details" } */
+/* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-additional-options "-mavx" { target avx } } */
-/* { dg-final { scan-tree-dump-times "vectorized \[1-9]\[0-9]* loops in function" 5 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized \[1-9]\[0-9]* loops in function" 5 "vect" { target i?86-*-* x86_64-*-* aarch64-*-* } } } */
int a[1024][1024];