workshare-reduction-1.c: New test.

2018-11-09  Jakub Jelinek  <jakub@redhat.com>

	* gcc.dg/gomp/workshare-reduction-1.c: New test.
	* gcc.dg/gomp/workshare-reduction-2.c: New test.
	* gcc.dg/gomp/workshare-reduction-3.c: New test.
	* gcc.dg/gomp/workshare-reduction-4.c: New test.
	* gcc.dg/gomp/workshare-reduction-5.c: New test.
	* gcc.dg/gomp/workshare-reduction-6.c: New test.
	* gcc.dg/gomp/workshare-reduction-7.c: New test.
	* gcc.dg/gomp/workshare-reduction-8.c: New test.
	* gcc.dg/gomp/workshare-reduction-9.c: New test.
	* gcc.dg/gomp/workshare-reduction-10.c: New test.
	* gcc.dg/gomp/workshare-reduction-11.c: New test.
	* gcc.dg/gomp/workshare-reduction-12.c: New test.
	* gcc.dg/gomp/workshare-reduction-13.c: New test.
	* gcc.dg/gomp/workshare-reduction-14.c: New test.
	* gcc.dg/gomp/workshare-reduction-15.c: New test.
	* gcc.dg/gomp/workshare-reduction-16.c: New test.
	* gcc.dg/gomp/workshare-reduction-17.c: New test.
	* gcc.dg/gomp/workshare-reduction-18.c: New test.
	* gcc.dg/gomp/workshare-reduction-19.c: New test.
	* gcc.dg/gomp/workshare-reduction-20.c: New test.
	* gcc.dg/gomp/workshare-reduction-21.c: New test.
	* gcc.dg/gomp/workshare-reduction-22.c: New test.
	* gcc.dg/gomp/workshare-reduction-23.c: New test.
	* gcc.dg/gomp/workshare-reduction-24.c: New test.
	* gcc.dg/gomp/workshare-reduction-25.c: New test.
	* gcc.dg/gomp/workshare-reduction-26.c: New test.
	* gcc.dg/gomp/workshare-reduction-27.c: New test.
	* gcc.dg/gomp/workshare-reduction-28.c: New test.
	* gcc.dg/gomp/workshare-reduction-29.c: New test.
	* gcc.dg/gomp/workshare-reduction-30.c: New test.
	* gcc.dg/gomp/workshare-reduction-31.c: New test.
	* gcc.dg/gomp/workshare-reduction-32.c: New test.
	* gcc.dg/gomp/workshare-reduction-33.c: New test.
	* gcc.dg/gomp/workshare-reduction-34.c: New test.
	* gcc.dg/gomp/workshare-reduction-35.c: New test.
	* gcc.dg/gomp/workshare-reduction-36.c: New test.
	* gcc.dg/gomp/workshare-reduction-37.c: New test.
	* gcc.dg/gomp/workshare-reduction-38.c: New test.
	* gcc.dg/gomp/workshare-reduction-39.c: New test.
	* gcc.dg/gomp/workshare-reduction-40.c: New test.
	* gcc.dg/gomp/workshare-reduction-41.c: New test.
	* gcc.dg/gomp/workshare-reduction-42.c: New test.
	* gcc.dg/gomp/workshare-reduction-43.c: New test.
	* gcc.dg/gomp/workshare-reduction-44.c: New test.
	* gcc.dg/gomp/workshare-reduction-45.c: New test.
	* gcc.dg/gomp/workshare-reduction-46.c: New test.
	* gcc.dg/gomp/workshare-reduction-47.c: New test.
	* gcc.dg/gomp/workshare-reduction-48.c: New test.
	* gcc.dg/gomp/workshare-reduction-49.c: New test.
	* gcc.dg/gomp/workshare-reduction-50.c: New test.
	* gcc.dg/gomp/workshare-reduction-51.c: New test.
	* gcc.dg/gomp/workshare-reduction-52.c: New test.
	* gcc.dg/gomp/workshare-reduction-53.c: New test.
	* gcc.dg/gomp/workshare-reduction-54.c: New test.
	* gcc.dg/gomp/workshare-reduction-55.c: New test.
	* gcc.dg/gomp/workshare-reduction-56.c: New test.
	* gcc.dg/gomp/workshare-reduction-57.c: New test.
	* gcc.dg/gomp/workshare-reduction-58.c: New test.
libgomp/
	* testsuite/libgomp.c-c++-common/task-reduction-13.c: New test.
	* testsuite/libgomp.c-c++-common/task-reduction-14.c: New test.

From-SVN: r265967
This commit is contained in:
Jakub Jelinek 2018-11-09 14:02:50 +01:00 committed by Jakub Jelinek
parent ff150bc478
commit 207286c314
62 changed files with 1529 additions and 0 deletions

View File

@ -1,3 +1,64 @@
2018-11-09 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/gomp/workshare-reduction-1.c: New test.
* gcc.dg/gomp/workshare-reduction-2.c: New test.
* gcc.dg/gomp/workshare-reduction-3.c: New test.
* gcc.dg/gomp/workshare-reduction-4.c: New test.
* gcc.dg/gomp/workshare-reduction-5.c: New test.
* gcc.dg/gomp/workshare-reduction-6.c: New test.
* gcc.dg/gomp/workshare-reduction-7.c: New test.
* gcc.dg/gomp/workshare-reduction-8.c: New test.
* gcc.dg/gomp/workshare-reduction-9.c: New test.
* gcc.dg/gomp/workshare-reduction-10.c: New test.
* gcc.dg/gomp/workshare-reduction-11.c: New test.
* gcc.dg/gomp/workshare-reduction-12.c: New test.
* gcc.dg/gomp/workshare-reduction-13.c: New test.
* gcc.dg/gomp/workshare-reduction-14.c: New test.
* gcc.dg/gomp/workshare-reduction-15.c: New test.
* gcc.dg/gomp/workshare-reduction-16.c: New test.
* gcc.dg/gomp/workshare-reduction-17.c: New test.
* gcc.dg/gomp/workshare-reduction-18.c: New test.
* gcc.dg/gomp/workshare-reduction-19.c: New test.
* gcc.dg/gomp/workshare-reduction-20.c: New test.
* gcc.dg/gomp/workshare-reduction-21.c: New test.
* gcc.dg/gomp/workshare-reduction-22.c: New test.
* gcc.dg/gomp/workshare-reduction-23.c: New test.
* gcc.dg/gomp/workshare-reduction-24.c: New test.
* gcc.dg/gomp/workshare-reduction-25.c: New test.
* gcc.dg/gomp/workshare-reduction-26.c: New test.
* gcc.dg/gomp/workshare-reduction-27.c: New test.
* gcc.dg/gomp/workshare-reduction-28.c: New test.
* gcc.dg/gomp/workshare-reduction-29.c: New test.
* gcc.dg/gomp/workshare-reduction-30.c: New test.
* gcc.dg/gomp/workshare-reduction-31.c: New test.
* gcc.dg/gomp/workshare-reduction-32.c: New test.
* gcc.dg/gomp/workshare-reduction-33.c: New test.
* gcc.dg/gomp/workshare-reduction-34.c: New test.
* gcc.dg/gomp/workshare-reduction-35.c: New test.
* gcc.dg/gomp/workshare-reduction-36.c: New test.
* gcc.dg/gomp/workshare-reduction-37.c: New test.
* gcc.dg/gomp/workshare-reduction-38.c: New test.
* gcc.dg/gomp/workshare-reduction-39.c: New test.
* gcc.dg/gomp/workshare-reduction-40.c: New test.
* gcc.dg/gomp/workshare-reduction-41.c: New test.
* gcc.dg/gomp/workshare-reduction-42.c: New test.
* gcc.dg/gomp/workshare-reduction-43.c: New test.
* gcc.dg/gomp/workshare-reduction-44.c: New test.
* gcc.dg/gomp/workshare-reduction-45.c: New test.
* gcc.dg/gomp/workshare-reduction-46.c: New test.
* gcc.dg/gomp/workshare-reduction-47.c: New test.
* gcc.dg/gomp/workshare-reduction-48.c: New test.
* gcc.dg/gomp/workshare-reduction-49.c: New test.
* gcc.dg/gomp/workshare-reduction-50.c: New test.
* gcc.dg/gomp/workshare-reduction-51.c: New test.
* gcc.dg/gomp/workshare-reduction-52.c: New test.
* gcc.dg/gomp/workshare-reduction-53.c: New test.
* gcc.dg/gomp/workshare-reduction-54.c: New test.
* gcc.dg/gomp/workshare-reduction-55.c: New test.
* gcc.dg/gomp/workshare-reduction-56.c: New test.
* gcc.dg/gomp/workshare-reduction-57.c: New test.
* gcc.dg/gomp/workshare-reduction-58.c: New test.
2018-11-09 Stafford Horne <shorne@gmail.com>
Richard Henderson <rth@twiddle.net>

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 0, 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_maybe_nonmonotonic_runtime_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (runtime)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: static, 2)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 2, 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_nonmonotonic_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (dynamic)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483650|-2147483646), 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: dynamic)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 2, 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_nonmonotonic_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: dynamic)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 2, 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_nonmonotonic_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (dynamic, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483650|-2147483646), 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: dynamic, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 2, 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_nonmonotonic_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: dynamic, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 3, 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_nonmonotonic_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (guided)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483651|-2147483645), 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: guided)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 3, 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_nonmonotonic_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: guided)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483648|-2147483648), 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_runtime_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: runtime)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 3, 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_nonmonotonic_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (guided, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483651|-2147483645), 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: guided, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 3, 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_nonmonotonic_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: guided, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (auto)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: auto)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: auto)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 0, 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_maybe_nonmonotonic_runtime_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (runtime)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, (?:2147483648|-2147483648), 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_runtime_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: runtime)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 4, 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_nonmonotonic_runtime_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: runtime)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, 4, 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_nonmonotonic_runtime_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: runtime)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (static)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: static)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: static)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (static, 2)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: static, 2)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: static, 2)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 2, 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_nonmonotonic_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (dynamic)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, (?:2147483650|-2147483646), 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: dynamic)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 2, 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_nonmonotonic_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: dynamic)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 2, 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_nonmonotonic_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (dynamic, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, (?:2147483650|-2147483646), 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: dynamic, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 2, 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_nonmonotonic_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: dynamic, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 3, 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_nonmonotonic_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (guided)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, (?:2147483651|-2147483645), 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: guided)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 3, 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_nonmonotonic_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: guided)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 3, 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_nonmonotonic_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (guided, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, (?:2147483651|-2147483645), 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: guided, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_start \[^\n\r]*, 3, 3, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_nonmonotonic_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: guided, 3)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (auto)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: auto)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (static)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop_ull\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: auto)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,26 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ordered_start \[^\n\r]*, (?:2147483648|-2147483648), 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_ordered_start " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_ordered_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ordered_runtime_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for ordered reduction (task, *: j) schedule (runtime)
for (i = a; i < b; i += c)
{
bar (&j);
#pragma omp ordered
j++;
}
}

View File

@ -0,0 +1,26 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ordered_start \[^\n\r]*, (?:2147483649|-2147483647), 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_ordered_start " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_ordered_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ordered_static_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for ordered reduction (task, *: j)
for (i = a; i < b; i += c)
{
bar (&j);
#pragma omp ordered
j++;
}
}

View File

@ -0,0 +1,26 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ordered_start \[^\n\r]*, (?:2147483650|-2147483646), 4, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_ordered_start " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_ordered_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ordered_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for ordered reduction (task, *: j) schedule (dynamic, 4)
for (i = a; i < b; i += c)
{
bar (&j);
#pragma omp ordered
j++;
}
}

View File

@ -0,0 +1,26 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_ordered_start \[^\n\r]*, (?:2147483651|-2147483645), 6, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_ordered_start " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_ordered_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_ordered_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for ordered reduction (task, *: j) schedule (guided, 6)
for (i = a; i < b; i += c)
{
bar (&j);
#pragma omp ordered
j++;
}
}

View File

@ -0,0 +1,27 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_doacross_start \[^\n\r]*, (?:2147483648|-2147483648), 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_post " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_wait " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_runtime_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for ordered(1) reduction (task, *: j) schedule (runtime)
for (i = a; i < b; i += c)
{
bar (&j);
#pragma omp ordered depend(sink: i - 1)
j++;
#pragma omp ordered depend(source)
}
}

View File

@ -0,0 +1,27 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_doacross_start \[^\n\r]*, (?:2147483649|-2147483647), 0, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_ull_post " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_ull_wait " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_static_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for ordered(1) reduction (task, *: j)
for (i = a; i < b; i += c)
{
bar (&j);
#pragma omp ordered depend(sink: i - 1)
j++;
#pragma omp ordered depend(source)
}
}

View File

@ -0,0 +1,27 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_doacross_start \[^\n\r]*, (?:2147483650|-2147483646), 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_ull_post " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_ull_wait " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_dynamic_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
unsigned long long int j;
void bar (unsigned long long int *);
void
foo (unsigned long long int a, unsigned long long int b, unsigned long long int c)
{
unsigned long long int i;
#pragma omp parallel
#pragma omp for ordered(1) reduction (task, *: j) schedule (dynamic)
for (i = a; i < b; i += c)
{
bar (&j);
#pragma omp ordered depend(sink: i - 1)
j++;
#pragma omp ordered depend(source)
}
}

View File

@ -0,0 +1,27 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_doacross_start \[^\n\r]*, (?:2147483651|-2147483645), 1, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_post " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_wait " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_guided_next " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for ordered(1) reduction (task, *: j) schedule (guided)
for (i = a; i < b; i += c)
{
bar (&j);
#pragma omp ordered depend(sink: i - 1)
j++;
#pragma omp ordered depend(source)
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: static)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (nonmonotonic: static)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (static, 2)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
int j;
void bar (int *);
void
foo (int a, int b, int c)
{
int i;
#pragma omp parallel
#pragma omp for reduction (task, *: j) schedule (monotonic: static, 2)
for (i = a; i < b; i += c)
{
j++;
bar (&j);
}
}

View File

@ -1,3 +1,8 @@
2018-11-09 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c-c++-common/task-reduction-13.c: New test.
* testsuite/libgomp.c-c++-common/task-reduction-14.c: New test.
2018-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* affinity.c: Include <string.h>, <stdio.h>.

View File

@ -0,0 +1,50 @@
extern
#ifdef __cplusplus
"C"
#endif
void abort (void);
#pragma omp declare reduction (foo: int: omp_out += omp_in - 1) initializer (omp_priv = 1)
int
main ()
{
int i, v = 0;
unsigned long long j;
volatile unsigned long long sixtyfour = 64;
int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0;
#pragma omp parallel
{
#define P(str) _Pragma (#str)
#define ONE_ORDERED_LOOP(var, i, max, n, clauses...) \
P (omp for ordered reduction (task, foo: var) clauses) \
for (i = 0; i < max; i++) \
{ \
var++; \
P (omp task in_reduction (foo: var)) \
var++; \
_Pragma ("omp ordered") \
if (v++ != i + n) \
abort (); \
} \
if (var != 128 || v != 64 + n) \
abort (); \
_Pragma ("omp barrier")
ONE_ORDERED_LOOP (a, i, 64, 0, )
ONE_ORDERED_LOOP (b, i, 64, 64, schedule (monotonic: static))
ONE_ORDERED_LOOP (c, i, 64, 128, schedule (static, 1))
ONE_ORDERED_LOOP (d, i, 64, 192, schedule (monotonic: runtime))
ONE_ORDERED_LOOP (e, i, 64, 256, schedule (dynamic, 2))
ONE_ORDERED_LOOP (f, i, 64, 320, schedule (monotonic: guided, 3))
ONE_ORDERED_LOOP (g, i, 64, 384, schedule (auto))
#pragma omp single
{ v = 0; a = 0; b = 0; c = 0; d = 0; e = 0; f = 0; g = 0; }
ONE_ORDERED_LOOP (a, j, sixtyfour, 0, )
ONE_ORDERED_LOOP (b, j, sixtyfour, 64, schedule (static))
ONE_ORDERED_LOOP (c, j, sixtyfour, 128, schedule (monotonic: static, 1))
ONE_ORDERED_LOOP (d, j, sixtyfour, 192, schedule (runtime))
ONE_ORDERED_LOOP (e, j, sixtyfour, 256, schedule (monotonic: dynamic, 2))
ONE_ORDERED_LOOP (f, j, sixtyfour, 320, schedule (guided, 3))
ONE_ORDERED_LOOP (g, j, sixtyfour, 384, schedule (monotonic: auto))
}
return 0;
}

View File

@ -0,0 +1,51 @@
extern
#ifdef __cplusplus
"C"
#endif
void abort (void);
#pragma omp declare reduction (foo: int: omp_out += omp_in - 1) initializer (omp_priv = 1)
int
main ()
{
int i, v = 0;
unsigned long long j;
volatile unsigned long long sixtyfour = 64;
int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0;
#pragma omp parallel
{
#define P(str) _Pragma (#str)
#define ONE_ORDERED_LOOP(var, i, max, n, clauses...) \
P (omp for ordered(1) reduction (task, foo: var) clauses) \
for (i = 1; i <= max; i++) \
{ \
P (omp task in_reduction (foo: var)) \
var++; \
P (omp ordered depend(sink: i - 1)) \
if (v++ != i + n - 1) \
abort (); \
_Pragma ("omp ordered depend(source)") \
var++; \
} \
if (var != 128 || v != 64 + n) \
abort (); \
_Pragma ("omp barrier")
ONE_ORDERED_LOOP (a, i, 64, 0, )
ONE_ORDERED_LOOP (b, i, 64, 64, schedule (monotonic: static))
ONE_ORDERED_LOOP (c, i, 64, 128, schedule (static, 1))
ONE_ORDERED_LOOP (d, i, 64, 192, schedule (monotonic: runtime))
ONE_ORDERED_LOOP (e, i, 64, 256, schedule (dynamic, 2))
ONE_ORDERED_LOOP (f, i, 64, 320, schedule (monotonic: guided, 3))
ONE_ORDERED_LOOP (g, i, 64, 384, schedule (auto))
#pragma omp single
{ v = 0; a = 0; b = 0; c = 0; d = 0; e = 0; f = 0; g = 0; }
ONE_ORDERED_LOOP (a, j, sixtyfour, 0, )
ONE_ORDERED_LOOP (b, j, sixtyfour, 64, schedule (static))
ONE_ORDERED_LOOP (c, j, sixtyfour, 128, schedule (monotonic: static, 1))
ONE_ORDERED_LOOP (d, j, sixtyfour, 192, schedule (runtime))
ONE_ORDERED_LOOP (e, j, sixtyfour, 256, schedule (monotonic: dynamic, 2))
ONE_ORDERED_LOOP (f, j, sixtyfour, 320, schedule (guided, 3))
ONE_ORDERED_LOOP (g, j, sixtyfour, 384, schedule (monotonic: auto))
}
return 0;
}