diff options
author | razya <razya@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-03 08:59:25 +0000 |
---|---|---|
committer | razya <razya@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-03 08:59:25 +0000 |
commit | 8d0991cf43d2f803eb41a51d4a3a8be1c2aa0985 (patch) | |
tree | 2b9e7a61b5a66c1df82fcc599b1f43406ad9814d /gcc/testsuite/gcc.dg/autopar/reduc-3.c | |
parent | 2b44354ec7f99a0c448bedf6474d493598cc56f6 (diff) | |
download | gcc-8d0991cf43d2f803eb41a51d4a3a8be1c2aa0985.tar.gz |
PR tree-optimization/38275
* tree-parloops.c (parallelize_loops): Replace profitability condition
for expected number of iterations.
* testsuite/gcc.dg/autopar/reduc-1char.c: Increase number
of iterations. Adjust the logic accordingly.
* testsuite/gcc.dg/autopar/reduc-2char.c: Ditto.
* testsuite/gcc.dg/autopar/reduc-1.c: Ditto.
* testsuite/gcc.dg/autopar/reduc-2.c: Ditto.
* testsuite/gcc.dg/autopar/reduc-3.c: Ditto.
* testsuite/gcc.dg/autopar/reduc-6.c: Ditto.
* testsuite/gcc.dg/autopar/reduc-7.c: Ditto.
* testsuite/gcc.dg/autopar/reduc-8.c: Ditto.
* testsuite/gcc.dg/autopar/reduc-9.c: Ditto.
* testsuite/gcc.dg/autopar/pr39500-1.c: Ditto.
* testsuite/gcc.dg/autopar/reduc-1short.c: Ditto.
* testsuite/gcc.dg/autopar/reduc-2short.c: Ditto.
* testsuite/gcc.dg/autopar/parallelization-1.c: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151372 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/autopar/reduc-3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/autopar/reduc-3.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.dg/autopar/reduc-3.c b/gcc/testsuite/gcc.dg/autopar/reduc-3.c index 0ec3aaa8102..6bc204711e5 100644 --- a/gcc/testsuite/gcc.dg/autopar/reduc-3.c +++ b/gcc/testsuite/gcc.dg/autopar/reduc-3.c @@ -4,10 +4,10 @@ #include <stdarg.h> #include <stdlib.h> -#define N 16 +#define N 1600 -unsigned int ub[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; -unsigned int uc[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; +unsigned int ub[N]; +unsigned int uc[N]; /* Reduction of unsigned-int. */ @@ -29,15 +29,29 @@ int main1 (int n, int res) return 0; } +__attribute__((noinline)) +void init_arrays () +{ + int i; + + for (i=0; i<N; i++) + { + ub[i] = i * 3; + uc[i] = i; + } +} + int main (void) { - main1 (N, 240); - main1 (N-1, 210); + init_arrays (); + main1 (N, 2558400); + main1 (N-1, 2555202); return 0; } + /* { dg-final { scan-tree-dump-times "Detected reduction" 1 "parloops" } } */ -/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops" } } */ +/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 2 "parloops" } } */ /* { dg-final { cleanup-tree-dump "parloops" } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ |