diff options
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 19 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/ipcp-cb-spec1.c | 19 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c | 21 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/ipcp-cb1.c | 25 |
4 files changed, 84 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 3414923..c102808 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,22 @@ +2025-10-20 Josef Melcr <jmelcr02@gmail.com> + + * testsuite/libgomp.c/ipcp-cb-spec1.c: Moved from + gcc/testsuite/gcc.dg/ipa/. + * testsuite/libgomp.c/ipcp-cb-spec2.c: Likewise. + * testsuite/libgomp.c/ipcp-cb1.c: Likewise. + +2025-10-20 Thomas Schwinge <tschwinge@baylibre.com> + + PR c++/114457 + PR c++/122268 + PR c++/120450 + * testsuite/libgomp.c++/target-flex-101.C: XFAIL GCN, nvptx + offloading compilation. + * testsuite/libgomp.c++/target-std__flat_map-concurrent.C: + Un-XFAIL GCN offloading compilation. + * testsuite/libgomp.c++/target-std__flat_multimap-concurrent.C: + Likewise. + 2025-10-16 Tobias Burnus <tburnus@baylibre.com> * testsuite/libgomp.c/declare-variant-4-gfx10-3-generic.c: Add diff --git a/libgomp/testsuite/libgomp.c/ipcp-cb-spec1.c b/libgomp/testsuite/libgomp.c/ipcp-cb-spec1.c new file mode 100644 index 0000000..a85e623 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/ipcp-cb-spec1.c @@ -0,0 +1,19 @@ +/* Test that GOMP_task is special cased when cpyfn is NULL. */ + +/* { dg-do run } */ +/* { dg-options "-O3 -fopenmp -flto -std=gnu99 -fdump-ipa-cp-details" } */ +/* { dg-require-effective-target fopenmp } */ +/* { dg-require-effective-target lto } */ + +void test(int c) { + for (int i = 0; i < c; i++) + if (!__builtin_constant_p(c)) + __builtin_abort(); +} +int main() { +#pragma omp task + test(7); + return 0; +} + +/* { dg-final { scan-wpa-ipa-dump "Creating a specialized node of main._omp_fn" "cp" } } */ diff --git a/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c b/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c new file mode 100644 index 0000000..01d7425 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c @@ -0,0 +1,21 @@ +/* Check that GOMP_task doesn't produce callback edges when cpyfn is not + NULL. */ + +/* { dg-do run } */ +/* { dg-options "-O3 -fopenmp -flto -std=gnu99 -fdump-ipa-cp-details" } */ +/* { dg-require-effective-target fopenmp } */ +/* { dg-require-effective-target lto } */ + +void test(int *a) { + for (int i = 0; i < 100; i++) { + a[i] = i; + } +} +int main() { + int a[100]; + __builtin_memset (a, 0, sizeof (a)); + #pragma omp task + test (a); +} + +/* { dg-final { scan-ipa-dump-not "Created callback edge" "cp" } } */ diff --git a/libgomp/testsuite/libgomp.c/ipcp-cb1.c b/libgomp/testsuite/libgomp.c/ipcp-cb1.c new file mode 100644 index 0000000..3418b5d --- /dev/null +++ b/libgomp/testsuite/libgomp.c/ipcp-cb1.c @@ -0,0 +1,25 @@ +/* Test that we can propagate constants into outlined OpenMP kernels. + This tests the underlying callback attribute and its related edges. */ + +/* { dg-do run } */ +/* { dg-options "-O3 -fopenmp -flto -std=gnu99 -fdump-ipa-cp-details" } */ +/* { dg-require-effective-target fopenmp } */ +/* { dg-require-effective-target lto } */ + +int a[100]; +void test(int c) { +#pragma omp parallel for + for (int i = 0; i < c; i++) { + if (!__builtin_constant_p(c)) { + __builtin_abort(); + } + a[i] = i; + } +} +int main() { + test(100); + return a[5] - 5; +} + +/* { dg-final { scan-wpa-ipa-dump "Creating a specialized node of test._omp_fn" "cp" } } */ +/* { dg-final { scan-wpa-ipa-dump "Aggregate replacements: 0\\\[0]=100\\(by_ref\\)" "cp" } } */ |