aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-12-18 11:42:20 +0100
committerJakub Jelinek <jakub@redhat.com>2023-12-18 11:57:39 +0100
commit000155e8eec27a35c9b431cbdc95f5d21d3e0872 (patch)
tree8193f5a3ac04f2a0430663ac2e7bf96ebad2bf33
parent10493cd4c1e852a4e89742b5c81e6d8bc2eef9a5 (diff)
downloadgcc-000155e8eec27a35c9b431cbdc95f5d21d3e0872.zip
gcc-000155e8eec27a35c9b431cbdc95f5d21d3e0872.tar.gz
gcc-000155e8eec27a35c9b431cbdc95f5d21d3e0872.tar.bz2
libgomp: Make libgomp.c/declare-variant-1.c test x86 specific
As written earlier, this test was written with the x86 specifics in mind and adding dg-final directives for it for other arches makes it unreadable. If a declare variant call can be resolved in gimple already as in the aarch64 or gcn cases, it can be done in gcc.dg/gomp/ and I believe we have tests like that already, the point of the test is that it is not known during gimplification time which exact call should be chosen as it depends on which declare simd clone it will be in. 2023-12-18 Jakub Jelinek <jakub@redhat.com> * testsuite/libgomp.c/declare-variant-1.c: Restrict the test to x86, drop because of that unneeded target selector from other directives and remove the aarch64 specific ones.
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-1.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-1.c b/libgomp/testsuite/libgomp.c/declare-variant-1.c
index 790e937..ac0c15b 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-1.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-1.c
@@ -1,9 +1,9 @@
-/* { dg-do link { target vect_simd_clones } } */
+/* { dg-do link { target { vect_simd_clones && { i?86-*-* x86_64-*-* } } } } */
/* { dg-require-effective-target lto } */
/* { dg-require-effective-target fpic } */
/* { dg-require-effective-target shared } */
/* { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized -O2 -fPIC -shared -flto -flto-partition=one" } */
-/* { dg-additional-options "-mno-sse3" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-mno-sse3" } */
int
f01 (int a)
@@ -40,17 +40,16 @@ f04 (int a)
int
test1 (int x)
{
- /* 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-*-* } } } */
+ /* At gimplification time, we can't decide yet which function to call,
+ given the f01 variant. */
+ /* { dg-final { scan-tree-dump-times "f04 \\\(x" 2 "gimple" } } */
/* 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-not "f02 \\\(x" "optimized" } } */
+ /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 14 "optimized" } } */
+ /* { dg-final { scan-ltrans-tree-dump-times "f01 \\\(x" 4 "optimized" } } */
int a = f04 (x);
int b = f04 (x);
return a + b;