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.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [interchange-mvt.c] - Blame information for rev 338

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 NMAX 2000
9
 
10
static int x1[NMAX], x2[NMAX], a[NMAX][NMAX], y1[NMAX], y2[NMAX];
11
 
12
static int __attribute__((noinline))
13
mvt (long N)
14
{
15
 
16
  int i,j;
17
 
18
  for (i = 0; i < N; i++)
19
    for (j = 0; j < N; j++)
20
      x1[i] = x1[i] + a[i][j] * y1[j];
21
 
22
  for (i = 0; i < N; i++)
23
    for (j = 0; j < N; j++)
24
      x2[i] = x2[i] + a[j][i] * y2[j];
25
 
26
  return x1[0] + x2[0];
27
}
28
 
29
extern void abort ();
30
 
31
int
32
main (void)
33
{
34
  int i, j, res;
35
 
36
  for (i = 0; i < NMAX; i++)
37
    for (j = 0; j < NMAX; j++)
38
      a[i][j] = i + j;
39
 
40
  for (i = 0; i < NMAX; i++)
41
    {
42
      x1[i] = 0;
43
      x2[i] = 2*i;
44
      y1[i] = 100 - i;
45
      y2[i] = i;
46
    }
47
 
48
  res = mvt (NMAX);
49
 
50
#if DEBUG
51
  fprintf (stderr, "res = %d \n", res);
52
#endif
53
 
54
  if (res != 199900000)
55
    abort ();
56
 
57
  return 0;
58
}
59
 
60
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
61
/* { dg-final { cleanup-tree-dump "graphite" } } */
62
 

powered by: WebSVN 2.1.0

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