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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [interchange-3.c] - Blame information for rev 516

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-require-effective-target size32plus } */
2
 
3
/* Formerly known as ltrans-3.c */
4
 
5
#define DEBUG 0
6
#if DEBUG
7
#include <stdio.h>
8
#endif
9
 
10
double u[1782225];
11
 
12
static void __attribute__((noinline))
13
foo (int N, int *res)
14
{
15
  unsigned int i, j;
16
  double sum = 0;
17
  for (i = 0; i < N; i++)
18
    {
19
      for (j = 0; j < N; j++)
20
        {
21
          sum = sum + u[i + 1335 * j];
22
        }
23
    }
24
 
25
  *res = sum + N + u[1336 * 2] + u[1336];
26
}
27
 
28
extern void abort ();
29
 
30
int
31
main (void)
32
{
33
  int i, j, res;
34
 
35
  for (i = 0; i < 1782225; i++)
36
    u[i] = 2;
37
 
38
  foo (1335, &res);
39
 
40
#if DEBUG
41
  fprintf (stderr, "res = %d \n", res);
42
#endif
43
 
44
  if (res != 3565789)
45
    abort ();
46
 
47
  return 0;
48
}
49
 
50
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
51
/* { dg-final { cleanup-tree-dump "graphite" } } */

powered by: WebSVN 2.1.0

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