Commit 383ec9fd by Tom de Vries Committed by Tom de Vries

Update outer-4.c and uns-outer-4.c

2015-07-27  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/autopar/outer-4.c (parloop): Remove superfluous noinline
	attribute.  Update comment.
	(main): Remove.
	Add scan for not parallelizing inner loop.
	* gcc.dg/autopar/uns-outer-4.c (parloop): Remove superfluous noinline
	attribute.
	(main): Remove.

From-SVN: r226269
parent 28ee8b98
2015-07-27 Tom de Vries <tom@codesourcery.com>
* gcc.dg/autopar/outer-4.c (parloop): Remove superfluous noinline
attribute. Update comment.
(main): Remove.
Add scan for not parallelizing inner loop.
* gcc.dg/autopar/uns-outer-4.c (parloop): Remove superfluous noinline
attribute.
(main): Remove.
2015-07-27 Marek Polacek <polacek@redhat.com> 2015-07-27 Marek Polacek <polacek@redhat.com>
PR bootstrap/67030 PR bootstrap/67030
......
...@@ -6,15 +6,16 @@ void abort (void); ...@@ -6,15 +6,16 @@ void abort (void);
int g_sum=0; int g_sum=0;
int x[500][500]; int x[500][500];
__attribute__((noinline)) void
void parloop (int N) parloop (int N)
{ {
int i, j; int i, j;
int sum; int sum;
/* Double reduction is currently not supported, outer loop is not /* The inner reduction is not recognized as reduction because we cannot assume
parallelized. Inner reduction is detected, inner loop is that int wraps on overflow. The way to fix this is to implement the
parallelized. */ reduction operation in unsigned type, but we've not yet implemented
this. */
sum = 0; sum = 0;
for (i = 0; i < N; i++) for (i = 0; i < N; i++)
for (j = 0; j < N; j++) for (j = 0; j < N; j++)
...@@ -23,13 +24,7 @@ void parloop (int N) ...@@ -23,13 +24,7 @@ void parloop (int N)
g_sum = sum; g_sum = sum;
} }
int main(void)
{
parloop(500);
return 0;
}
/* { dg-final { scan-tree-dump-times "parallelizing inner loop" 0 "parloops" } } */
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" { xfail *-*-* } } } */
...@@ -6,7 +6,7 @@ void abort (void); ...@@ -6,7 +6,7 @@ void abort (void);
unsigned int g_sum=0; unsigned int g_sum=0;
unsigned int x[500][500]; unsigned int x[500][500];
void __attribute__((noinline)) void
parloop (int N) parloop (int N)
{ {
int i, j; int i, j;
...@@ -23,14 +23,5 @@ parloop (int N) ...@@ -23,14 +23,5 @@ parloop (int N)
g_sum = sum; g_sum = sum;
} }
int
main (void)
{
parloop (500);
return 0;
}
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */ /* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
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