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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [interchange-9.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-require-effective-target size32plus } */
2
 
3
#define DEBUG 0
4
#if DEBUG
5
#include <stdio.h>
6
#endif
7
 
8
#define N 111
9
#define M 111
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 != 24642)
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.