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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr46614.c] - Blame information for rev 753

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR rtl-optimization/46614 */
2
/* { dg-do run } */
3
/* { dg-options "-O -fno-rename-registers -fsched2-use-superblocks -fschedule-insns2 -funroll-loops" } */
4
/* { dg-require-effective-target scheduling } */
5
 
6
extern void abort (void);
7
 
8
struct S
9
{
10
  unsigned char a;
11
  unsigned char b;
12
  unsigned int c;
13
  unsigned int e;
14
  unsigned char f;
15
  unsigned int g;
16
};
17
 
18
void bar (struct S *x)
19
{
20
  int i;
21
  struct S *p = x;
22
  struct S r[16];
23
  unsigned j;
24
  for (i = 0; i < 16; i++)
25
    {
26
      r[i].c = p->b + p->c;
27
      j = p->c + p->f;
28
      r[i].a = j + p->b;
29
      r[i].f = p->f + p->e;
30
      r[i].g = p->b + p->c;
31
    }
32
  for (i = 0; i < 16; i++)
33
    {
34
      if (r[i].c != x[i].b + x[i].c
35
          || r[i].a != x[i].c + x[i].f + x[i].b
36
          || r[i].f != x[i].f + x[i].e
37
          || r[i].g != x[i].b + x[i].c)
38
        abort ();
39
    }
40
  for (i = 0; i < 16; i++)
41
    {
42
      r[i].b = p->c;
43
      if (r[i].b != x[i].c)
44
        abort ();
45
    }
46
}
47
 
48
int
49
main ()
50
{
51
  int i;
52
  struct S x[16];
53
  for (i = 0; i < 16; i++)
54
    x[i].b = x[i].c = x[i].e = x[i].f = 5;
55
  bar (x);
56
  return 0;
57
}

powered by: WebSVN 2.1.0

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