]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/sms-7.c
Remove Cell Broadband Engine SPU targets
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / sms-7.c
CommitLineData
71a6fe66 1/* { dg-do run } */
593ba581 2/* { dg-options "-O3 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms -fmodulo-sched-allow-regmoves --param sms-min-sc=1" } */
71a6fe66
BM
3
4extern void abort (void);
5
bd639075 6__attribute__ ((noinline))
63e50533 7void foo (int * __restrict__ a, int * __restrict__ b, short * c)
71a6fe66
BM
8{
9 int i;
10 for(i = 0; i < 100; i+=4)
11 {
12 a[i] = b[i] * c[i];
13 a[i+1] = b[i+1] * c[i+1];
14 a[i+2] = b[i+2] * c[i+2];
15 a[i+3] = b[i+3] * c[i+3];
16 }
17}
18
63e50533
RE
19int a[100], b[100];
20short c[100];
71a6fe66
BM
21
22int main()
23{
08915830
AH
24#if (__SIZEOF_INT__ <= 2)
25 int i;
26 long res;
27#else
71a6fe66 28 int i, res;
08915830 29#endif
71a6fe66
BM
30 for(i = 0; i < 100; i++)
31 {
32 b[i] = c[i] = i;
33 }
34 foo(a, b, c);
35
36 res = 0;
37 for(i = 0; i < 100; i++)
38 {
39 res += a[i];
40 }
41 if(res != 328350)
42 abort();
43
44 return 0;
45}
46
47