[NDS32] Add intrinsic functions for TLB operation and data prefech.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr46614.c
blob92bcf4e0161e74aad11ff96d48cf086854fc72e8
1 /* 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 } */
6 extern void abort (void);
8 struct S
10 unsigned char a;
11 unsigned char b;
12 unsigned int c;
13 unsigned int e;
14 unsigned char f;
15 unsigned int g;
18 void bar (struct S *x)
20 int i;
21 struct S *p = x;
22 struct S r[16];
23 unsigned j;
24 for (i = 0; i < 16; i++)
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;
32 for (i = 0; i < 16; i++)
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 ();
40 for (i = 0; i < 16; i++)
42 r[i].b = p->c;
43 if (r[i].b != x[i].c)
44 abort ();
48 int
49 main ()
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;