diff options
author | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2023-12-15 13:48:08 +0000 |
---|---|---|
committer | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2023-12-15 13:48:08 +0000 |
commit | 863df360fb6549ae35af9f052343d2578d4d2b63 (patch) | |
tree | a3471d930cf43ac69aaadd0dd7b75f7f99983833 | |
parent | 1d8ac2a74fe37bb3d2fef63ed1ce19bc6f983189 (diff) | |
download | gcc-863df360fb6549ae35af9f052343d2578d4d2b63.zip gcc-863df360fb6549ae35af9f052343d2578d4d2b63.tar.gz gcc-863df360fb6549ae35af9f052343d2578d4d2b63.tar.bz2 |
Fix tests for gomp
This is to fix testisms initially introduced by:
commit f5fc001a84a7dbb942a6252b3162dd38b4aae311
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Mon Dec 11 14:24:41 2023 +0000
aarch64: enable mixed-types for aarch64 simdclones
gcc/testsuite/ChangeLog:
* gcc.dg/gomp/pr87887-1.c: Fixed test.
* gcc.dg/gomp/pr89246-1.c: Likewise.
* gcc.dg/gomp/simd-clones-2.c: Likewise.
libgomp/ChangeLog:
* testsuite/libgomp.c/declare-variant-1.c: Fixed test.
* testsuite/libgomp.fortran/declare-simd-1.f90: Likewise.
-rw-r--r-- | gcc/testsuite/gcc.dg/gomp/pr87887-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/gomp/pr89246-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/gomp/simd-clones-2.c | 1 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/declare-variant-1.c | 13 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/declare-simd-1.f90 | 12 |
5 files changed, 9 insertions, 20 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/pr87887-1.c b/gcc/testsuite/gcc.dg/gomp/pr87887-1.c index 2818983..8b04ffd 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr87887-1.c +++ b/gcc/testsuite/gcc.dg/gomp/pr87887-1.c @@ -10,7 +10,6 @@ foo (int x) { return (struct S) { x }; } -/* { dg-warning "unsupported return type ‘struct S’ for ‘simd’ functions" "" { target aarch64*-*-* } .-4 } */ #pragma omp declare simd int @@ -18,7 +17,6 @@ bar (struct S x) { return x.n; } -/* { dg-warning "unsupported argument type ‘struct S’ for ‘simd’ functions" "" { target aarch64*-*-* } .-4 } */ #pragma omp declare simd uniform (x) int diff --git a/gcc/testsuite/gcc.dg/gomp/pr89246-1.c b/gcc/testsuite/gcc.dg/gomp/pr89246-1.c index 4a0fd74..dfe629c 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr89246-1.c +++ b/gcc/testsuite/gcc.dg/gomp/pr89246-1.c @@ -8,7 +8,6 @@ int foo (__int128 x) { return x; } -/* { dg-warning "unsupported argument type ‘__int128’ for ‘simd’ functions" "" { target aarch64*-*-* } .-4 } */ #pragma omp declare simd extern int bar (int x); diff --git a/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c b/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c index f122440..354078a 100644 --- a/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c +++ b/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c @@ -19,7 +19,6 @@ float setArray(float *a, float x, int k) /* { dg-final { scan-tree-dump "_ZGVnN2ua32vl_setArray" "optimized" { target aarch64*-*-* } } } */ /* { dg-final { scan-tree-dump "_ZGVnN4ua32vl_setArray" "optimized" { target aarch64*-*-* } } } */ /* { dg-final { scan-tree-dump "_ZGVnN2vvva32_addit" "optimized" { target aarch64*-*-* } } } */ -/* { dg-final { scan-tree-dump "_ZGVnN4vvva32_addit" "optimized" { target aarch64*-*-* } } } */ /* { dg-final { scan-tree-dump "_ZGVnM2vl66u_addit" "optimized" { target aarch64*-*-* } } } */ /* { dg-final { scan-tree-dump "_ZGVnM4vl66u_addit" "optimized" { target aarch64*-*-* } } } */ diff --git a/libgomp/testsuite/libgomp.c/declare-variant-1.c b/libgomp/testsuite/libgomp.c/declare-variant-1.c index 6129f23..790e937 100644 --- a/libgomp/testsuite/libgomp.c/declare-variant-1.c +++ b/libgomp/testsuite/libgomp.c/declare-variant-1.c @@ -40,16 +40,17 @@ f04 (int a) int test1 (int x) { - /* At gimplification time, we can't decide yet which function to call. */ - /* { dg-final { scan-tree-dump-times "f04 \\\(x" 2 "gimple" } } */ + /* At gimplification time, we can't decide yet which function to call for + x86_64 targets, given the f01 variant. */ + /* { dg-final { scan-tree-dump-times "f04 \\\(x" 2 "gimple" { target x86_64-*-* } } } */ /* After simd clones are created, the original non-clone test1 shall call f03 (score 6), the sse2/avx/avx2 clones too, but avx512f clones shall call f01 with score 8. */ /* { dg-final { scan-ltrans-tree-dump-not "f04 \\\(x" "optimized" } } */ - /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 14 "optimized" { target { !aarch64*-*-* } } } } } */ - /* { dg-final { scan-ltrans-tree-dump-times "f01 \\\(x" 4 "optimized" { target { !aarch64*-*-* } } } } } */ - /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 10 "optimized" { target { aarch64*-*-* } } } } } */ - /* { dg-final { scan-ltrans-tree-dump-not "f01 \\\(x" "optimized" { target { aarch64*-*-* } } } } } */ + /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 14 "optimized" { target { !aarch64*-*-* } } } } */ + /* { dg-final { scan-ltrans-tree-dump-times "f01 \\\(x" 4 "optimized" { target { !aarch64*-*-* } } } } */ + /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 10 "optimized" { target { aarch64*-*-* } } } } */ + /* { dg-final { scan-ltrans-tree-dump-not "f01 \\\(x" "optimized" { target { aarch64*-*-* } } } } */ int a = f04 (x); int b = f04 (x); return a + b; diff --git a/libgomp/testsuite/libgomp.fortran/declare-simd-1.f90 b/libgomp/testsuite/libgomp.fortran/declare-simd-1.f90 index 9d44524..b6d9522 100644 --- a/libgomp/testsuite/libgomp.fortran/declare-simd-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/declare-simd-1.f90 @@ -1,5 +1,5 @@ -! { dg-do run { target vect_simd_clones } } -! { dg-options "-fno-inline -cpp -D__aarch64__" } +! { dg-do run { target { vect_simd_clones && { x86_64-*-* || i?86-*-* } } } } +! { dg-options "-fno-inline" } ! { dg-additional-options "-msse2" { target sse2_runtime } } ! { dg-additional-options "-mavx" { target avx_runtime } } @@ -75,11 +75,7 @@ end module declare_simd_1_mod end do contains function baz (x, y, z) -#ifdef __aarch64__ - !$omp declare simd (baz) simdlen (4) uniform (x, y) -#else !$omp declare simd (baz) simdlen (8) uniform (x, y) -#endif !$omp declare simd (baz) integer, value :: y real, value :: z @@ -94,10 +90,6 @@ function bar (a, b, c) real :: bar double precision, value :: a !$omp declare simd (bar) -#ifdef __aarch64__ - !$omp declare simd (bar) simdlen (2) linear (b : 2) -#else !$omp declare simd (bar) simdlen (4) linear (b : 2) -#endif bar = a + b * c end function bar |