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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.graphite/] [force-parallel-7.c] - Blame information for rev 742

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

Line No. Rev Author Line
1 735 jeremybenn
#define N 500
2
 
3
int A[N+5][N+5][N+5];
4
 
5
int foo(void)
6
{
7
  int i, j, k;
8
 
9
  /* Loop i: carried no dependency.  */
10
  for (i = 0; i < N; i++)
11
    for (j = 0; j < N; j++)
12
      for (k = 0; k < N; k++)
13
        A[k+1][j+2][i+1] = A[k][j][i+1];
14
 
15
  for (i = 0; i < N; i++)
16
    /* Loop j: carried no dependency.  */
17
    for (j = 0; j < N; j++)
18
      /* Loop k: carreid no dependency.  */
19
      for (k = 0; k < N; k++)
20
        A[i+1][j][k] = A[i][j][k+1];
21
 
22
  return A[1][5][2];
23
}
24
 
25
int main(void)
26
{
27
  foo();
28
 
29
  return 0;
30
}
31
 
32
/* Check that parallel code generation part make the right answer.  */
33
/* { dg-final { scan-tree-dump-times "3 loops carried no dependency" 1 "graphite" } } */
34
/* { dg-final { cleanup-tree-dump "graphite" } } */
35
/* { dg-final { scan-tree-dump-times "loopfn.0" 5 "optimized" } } */
36
/* { dg-final { cleanup-tree-dump "parloops" } } */
37
/* { 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.