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

Subversion Repositories openrisc

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

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

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