From 383ec9fd778e0bdbfb532d7d0797d0e0fe3fc317 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 27 Jul 2015 20:05:09 +0000 Subject: [PATCH] Update outer-4.c and uns-outer-4.c 2015-07-27 Tom de Vries * 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 --- gcc/testsuite/ChangeLog | 10 ++++++++++ gcc/testsuite/gcc.dg/autopar/outer-4.c | 19 +++++++------------ gcc/testsuite/gcc.dg/autopar/uns-outer-4.c | 11 +---------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b769807a26a..ea1dfb64374 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2015-07-27 Tom de Vries + + * 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 PR bootstrap/67030 diff --git a/gcc/testsuite/gcc.dg/autopar/outer-4.c b/gcc/testsuite/gcc.dg/autopar/outer-4.c index 2027499eb28..681cf856e3f 100644 --- a/gcc/testsuite/gcc.dg/autopar/outer-4.c +++ b/gcc/testsuite/gcc.dg/autopar/outer-4.c @@ -6,15 +6,16 @@ void abort (void); int g_sum=0; int x[500][500]; -__attribute__((noinline)) -void parloop (int N) +void +parloop (int N) { int i, j; int sum; - /* Double reduction is currently not supported, outer loop is not - parallelized. Inner reduction is detected, inner loop is - parallelized. */ + /* The inner reduction is not recognized as reduction because we cannot assume + that int wraps on overflow. The way to fix this is to implement the + reduction operation in unsigned type, but we've not yet implemented + this. */ sum = 0; for (i = 0; i < N; i++) for (j = 0; j < N; j++) @@ -23,13 +24,7 @@ void parloop (int N) 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 "loopfn" 4 "optimized" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/autopar/uns-outer-4.c b/gcc/testsuite/gcc.dg/autopar/uns-outer-4.c index 8365a898633..30ead2529ea 100644 --- a/gcc/testsuite/gcc.dg/autopar/uns-outer-4.c +++ b/gcc/testsuite/gcc.dg/autopar/uns-outer-4.c @@ -6,7 +6,7 @@ void abort (void); unsigned int g_sum=0; unsigned int x[500][500]; -void __attribute__((noinline)) +void parloop (int N) { int i, j; @@ -23,14 +23,5 @@ parloop (int N) 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 "loopfn" 4 "optimized" } } */ -- 2.30.2