Commit ab3306d2 by Tom de Vries Committed by Tom de Vries

Update parloops-exit-first-loop-alt{,-2,-3}.c

2015-06-13  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Add comment.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
	* testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Add comment.
	(N): Define.
	(main): Use N instead of hardcoded constants.

	* gcc.dg/parloops-exit-first-loop-alt-2.c: Add comment.
	(main): Remove superfluous attributes.
	* gcc.dg/parloops-exit-first-loop-alt-3.c: Same.
	* gcc.dg/parloops-exit-first-loop-alt.c: Same.

From-SVN: r224452
parent 522b7b88
2015-06-13 Tom de Vries <tom@codesourcery.com>
* gcc.dg/parloops-exit-first-loop-alt-2.c: Add comment.
(main): Remove superfluous attributes.
* gcc.dg/parloops-exit-first-loop-alt-3.c: Same.
* gcc.dg/parloops-exit-first-loop-alt.c: Same.
2015-06-12 Venkataramanan Kumar <venkataramanan.kumar@amd.com> 2015-06-12 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
* gcc.target/i386/monitorx.c: New. * gcc.target/i386/monitorx.c: New.
......
...@@ -2,14 +2,16 @@ ...@@ -2,14 +2,16 @@
/* { dg-require-effective-target pthread } */ /* { dg-require-effective-target pthread } */
/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops" } */ /* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops" } */
/* Constant bound, vector addition. */
#define N 1000 #define N 1000
unsigned int a[N]; unsigned int a[N];
unsigned int b[N]; unsigned int b[N];
unsigned int c[N]; unsigned int c[N];
void __attribute__((noclone,noinline)) void
f (unsigned int n) f (void)
{ {
int i; int i;
......
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
/* { dg-require-effective-target pthread } */ /* { dg-require-effective-target pthread } */
/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops" } */ /* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops" } */
/* Variable bound, reduction. */
unsigned int *a; unsigned int *a;
unsigned int __attribute__((noclone,noinline)) unsigned int
f (unsigned int n) f (unsigned int n)
{ {
int i; int i;
......
...@@ -2,13 +2,15 @@ ...@@ -2,13 +2,15 @@
/* { dg-require-effective-target pthread } */ /* { dg-require-effective-target pthread } */
/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops" } */ /* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops" } */
/* Variable bound, vector addition. */
#define N 1000 #define N 1000
unsigned int a[N]; unsigned int a[N];
unsigned int b[N]; unsigned int b[N];
unsigned int c[N]; unsigned int c[N];
void __attribute__((noclone,noinline)) void
f (unsigned int n) f (unsigned int n)
{ {
int i; int i;
......
2015-06-13 Tom de Vries <tom@codesourcery.com>
* testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Add comment.
* testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
* testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Add comment.
(N): Define.
(main): Use N instead of hardcoded constants.
2015-06-05 Tom de Vries <tom@codesourcery.com> 2015-06-05 Tom de Vries <tom@codesourcery.com>
merge from gomp4 branch: merge from gomp4 branch:
......
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2 -ftree-parallelize-loops=2" } */ /* { dg-options "-O2 -ftree-parallelize-loops=2" } */
/* Constant bound, vector addition. */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2 -ftree-parallelize-loops=2" } */ /* { dg-options "-O2 -ftree-parallelize-loops=2" } */
/* Variable bound, reduction. */
#define N 4000
unsigned int *a; unsigned int *a;
unsigned int __attribute__((noclone,noinline)) unsigned int __attribute__((noclone,noinline))
...@@ -19,11 +23,11 @@ int ...@@ -19,11 +23,11 @@ int
main (void) main (void)
{ {
unsigned int res; unsigned int res;
unsigned int array[4000]; unsigned int array[N];
int i; int i;
for (i = 0; i < 4000; ++i) for (i = 0; i < N; ++i)
array[i] = i % 7; array[i] = i % 7;
a = &array[0]; a = &array[0];
res = f (4000); res = f (N);
return !(res == 11995); return !(res == 11995);
} }
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2 -ftree-parallelize-loops=2" } */ /* { dg-options "-O2 -ftree-parallelize-loops=2" } */
/* Variable bound, vector addition. */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment