OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [autopar/] [outer-5.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
3
 
4
void abort (void);
5
 
6
int x[500][500];
7
int y[500];
8
int g_sum=0;
9
 
10
__attribute__((noinline))
11
void init (int i, int j)
12
{
13
  x[i][j]=1;
14
}
15
 
16
__attribute__((noinline))
17
void parloop (int N)
18
{
19
  int i, j;
20
  int sum;
21
 
22
  /* Inner cycle is currently not supported, outer loop is not
23
     parallelized.  Inner reduction is detected, inner loop is
24
     parallelized.  */
25
  for (i = 0; i < N; i++)
26
  {
27
    sum = 0;
28
    for (j = 0; j < N; j++)
29
      sum += x[i][j];
30
    y[i]=sum;
31
  }
32
  g_sum = sum;
33
}
34
 
35
int main(void)
36
{
37
  int i,j;
38
  for (i = 0; i < 500; i++)
39
    for (j = 0; j < 500; j++)
40
      init(i, j);
41
 
42
  parloop(500);
43
 
44
  return 0;
45
}
46
 
47
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */
48
/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
49
/* { dg-final { cleanup-tree-dump "parloops" } } */
50
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.