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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [block-8.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
/* { dg-require-effective-target run_expensive_tests }  PR testsuite/48283 */
3
 
4
#define DEBUG 0
5
#if DEBUG
6
#include <stdio.h>
7
#endif
8
 
9
#define N 200
10
 
11
int A[N][N], B[N][N], C[N][N];
12
 
13
static void __attribute__((noinline))
14
matmult (void)
15
{
16
  int i, j, k;
17
 
18
  for (i = 0; i < N; i++)
19
    for (j = 0; j < N; j++)
20
      A[i][j] = 0;
21
 
22
  /* This should be blocked.  */
23
  for (i = 0; i < N; i++)
24
    for (j = 0; j < N; j++)
25
      for (k = 0; k < N; k++)
26
        A[i][j] += B[i][k] * C[k][j];
27
}
28
 
29
extern void abort ();
30
 
31
int
32
main (void)
33
{
34
  int i, j, res = 0;
35
 
36
  for (i = 0; i < N; i++)
37
    for (j = 0; j < N; j++)
38
      {
39
        B[i][j] = j;
40
        C[i][j] = i;
41
      }
42
 
43
  matmult ();
44
 
45
  for (i = 0; i < N; i++)
46
    res += A[i][i];
47
 
48
#if DEBUG
49
  fprintf (stderr, "res = %d \n", res);
50
#endif
51
 
52
  if (res != 529340000)
53
    abort ();
54
 
55
  return 0;
56
}
57
 
58
/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */
59
/* { 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.