diff options
author | Thomas Schwinge <tschwinge@baylibre.com> | 2024-11-09 13:37:53 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2024-11-10 11:19:02 +0100 |
commit | 730f28b081bea4a749f9b82902446731ec8faa93 (patch) | |
tree | 814b25abbe00681284a6c64f1e8ed8eeecd391df | |
parent | d7ef7d1258d8ef715be29dea0788a3e410c1d279 (diff) | |
download | gcc-730f28b081bea4a749f9b82902446731ec8faa93.zip gcc-730f28b081bea4a749f9b82902446731ec8faa93.tar.gz gcc-730f28b081bea4a749f9b82902446731ec8faa93.tar.bz2 |
Adjust 'libgomp.c/max_vf-*.c'
For configurations where both GCN and nvptx offloading are enabled, we get:
PASS: libgomp.c/max_vf-1.c (test for excess errors)
PASS: libgomp.c/max_vf-1.c scan-tree-dump-times ompexp "GOMP_MAX_VF" 2
PASS: libgomp.c/max_vf-1.c scan-tree-dump-times ompexp "__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \\(.*, D\\.[0-9]*, 0\\);" 1
PASS: libgomp.c/max_vf-1.c scan-amdgcn-amdhsa-offload-tree-dump-times optimized "__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \\(.*, 64, 0\\);" 1
FAIL: libgomp.c/max_vf-1.c scan-nvptx-none-offload-tree-dump-times optimized "__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \\(.*, 64, 0\\);" 1
FAIL: libgomp.c/max_vf-1.c scan-amdgcn-amdhsa-offload-tree-dump-times optimized "__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \\(.*, 7, 0\\);" 1
PASS: libgomp.c/max_vf-1.c scan-nvptx-none-offload-tree-dump-times optimized "__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \\(.*, 7, 0\\);" 1
Avoid these FAILs via 'only_for_offload_target [...]'. Also, for consistency
with other libgomp test cases, use effective-target specifiers of the libgomp
test suite. Fix-up for recent commit d334f729e53867b838e867375b3f475ba793d96e
"openmp: Add testcases for omp_max_vf".
libgomp/
* testsuite/libgomp.c/max_vf-1.c: Adjust.
* testsuite/libgomp.c/max_vf-2.c: Likewise.
-rw-r--r-- | libgomp/testsuite/libgomp.c/max_vf-1.c | 6 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/max_vf-2.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libgomp/testsuite/libgomp.c/max_vf-1.c b/libgomp/testsuite/libgomp.c/max_vf-1.c index 9c8d5dc..70f6b86 100644 --- a/libgomp/testsuite/libgomp.c/max_vf-1.c +++ b/libgomp/testsuite/libgomp.c/max_vf-1.c @@ -1,7 +1,7 @@ /* Test that omp parallel simd schedule uses the correct max_vf for the host system, when target directives are present. */ -/* { dg-require-effective-target offloading_enabled } */ +/* { dg-require-effective-target offload_target_any } */ /* { dg-do link } */ /* { dg-options "-fopenmp -O2 -fdump-tree-ompexp -foffload=-fdump-tree-optimized" } */ @@ -41,7 +41,7 @@ f3 (int *a, int *b, int *c) { dg-final { scan-tree-dump-times {__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \(.*, D\.[0-9]*, 0\);} 1 "ompexp" { target { x86_64-*-* i?86-*-* } } } } */ /* Test SIMD offload devices -{ dg-final { scan-offload-tree-dump-times {__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \(.*, 64, 0\);} 1 "optimized" { target { offload_gcn } } } } -{ dg-final { scan-offload-tree-dump-times {__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \(.*, 7, 0\);} 1 "optimized" { target { offload_nvptx } } } } */ +{ dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump-times {__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \(.*, 64, 0\);} 1 "optimized" { target offload_target_amdgcn } } } +{ dg-final { only_for_offload_target nvptx-none scan-offload-tree-dump-times {__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \(.*, 7, 0\);} 1 "optimized" { target offload_target_nvptx } } } */ int main() {} diff --git a/libgomp/testsuite/libgomp.c/max_vf-2.c b/libgomp/testsuite/libgomp.c/max_vf-2.c index 91744c3..545cf1d 100644 --- a/libgomp/testsuite/libgomp.c/max_vf-2.c +++ b/libgomp/testsuite/libgomp.c/max_vf-2.c @@ -1,7 +1,7 @@ /* Ensure that the default safelen is set correctly for the larger of the host and offload device, to prevent defeating the vectorizer. */ -/* { dg-require-effective-target offloading_enabled } */ +/* { dg-require-effective-target offload_target_any } */ /* { dg-do link } */ /* { dg-options "-fopenmp -O2 -fdump-tree-omplower" } */ @@ -16,6 +16,6 @@ int f(float *a, float *b, int n) } /* Make sure that the max_vf used is suitable for the offload device. -{ dg-final { scan-tree-dump-times {omp simd safelen\(64\)} 1 "omplower" { target { offload_gcn } } } } */ +{ dg-final { scan-tree-dump-times {omp simd safelen\(64\)} 1 "omplower" { target offload_target_amdgcn } } } */ int main() {} |