URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 338 |
/* { dg-require-effective-target size32plus } */
|
/* { dg-require-effective-target size32plus } */
|
|
|
#define DEBUG 0
|
#define DEBUG 0
|
#if DEBUG
|
#if DEBUG
|
#include <stdio.h>
|
#include <stdio.h>
|
#endif
|
#endif
|
|
|
#define N 1111
|
#define N 1111
|
#define M 1111
|
#define M 1111
|
|
|
static int __attribute__((noinline))
|
static int __attribute__((noinline))
|
foo (int *x)
|
foo (int *x)
|
{
|
{
|
int i, j;
|
int i, j;
|
int sum = 0;
|
int sum = 0;
|
|
|
for (j = 0; j < M; ++j)
|
for (j = 0; j < M; ++j)
|
for (i = 0; i < N; ++i)
|
for (i = 0; i < N; ++i)
|
sum += x[M * i + j];
|
sum += x[M * i + j];
|
|
|
return sum;
|
return sum;
|
}
|
}
|
|
|
extern void abort ();
|
extern void abort ();
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
int A[N*M];
|
int A[N*M];
|
int i, res;
|
int i, res;
|
|
|
for (i = 0; i < N*M; i++)
|
for (i = 0; i < N*M; i++)
|
A[i] = 2;
|
A[i] = 2;
|
|
|
res = foo (A);
|
res = foo (A);
|
|
|
#if DEBUG
|
#if DEBUG
|
fprintf (stderr, "res = %d \n", res);
|
fprintf (stderr, "res = %d \n", res);
|
#endif
|
#endif
|
|
|
if (res != 2468642)
|
if (res != 2468642)
|
abort ();
|
abort ();
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
|
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
|
/* { dg-final { cleanup-tree-dump "graphite" } } */
|
/* { dg-final { cleanup-tree-dump "graphite" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.