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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [interchange-9.c] - Blame information for rev 826

Details | Compare with Previous | View Log

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