Hi!

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).

Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk.

2021-01-30  Jakub Jelinek  <ja...@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.

--- gcc/testsuite/gcc.dg/gomp/simd-2.c.jj       2020-10-07 10:49:28.345534230 
+0200
+++ gcc/testsuite/gcc.dg/gomp/simd-2.c  2021-01-29 18:02:56.654262756 +0100
@@ -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];
 
--- gcc/testsuite/gcc.dg/gomp/simd-3.c.jj       2020-10-07 10:49:28.345534230 
+0200
+++ gcc/testsuite/gcc.dg/gomp/simd-3.c  2021-01-29 18:03:10.636104930 +0100
@@ -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];
 

        Jakub

Reply via email to