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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [block-0.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
#define DEBUG 0
2
#if DEBUG
3
#include <stdio.h>
4
#endif
5
 
6
#define N 1000
7
int a[N];
8
 
9
static int __attribute__((noinline))
10
foo (void)
11
{
12
  int j;
13
  int i;
14
 
15
  /* This is not blocked as it is not profitable.  */
16
  for (i = 0; i < N; i++)
17
    for (j = 0; j < N; j++)
18
      a[j] = a[i] + 1;
19
 
20
  return a[0];
21
}
22
 
23
extern void abort ();
24
 
25
int
26
main (void)
27
{
28
  int i, res;
29
 
30
  for (i = 0; i < N; i++)
31
    a[i] = i;
32
 
33
  res = foo ();
34
 
35
#if DEBUG
36
  fprintf (stderr, "res = %d \n", res);
37
#endif
38
 
39
  if (res != 1999)
40
    abort ();
41
 
42
  return 0;
43
}
44
 
45
/* { dg-final { scan-tree-dump-not "will be loop blocked" "graphite" } } */
46
/* { 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.