IVOPT performance tuning patch. The main problem is a variant of maximal weight
[official-gcc.git] / gcc / testsuite / gcc.dg / sms-6.c
blob34e9cf82da418de13be67be8eee8a4cc91fb7376
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */
4 extern void abort (void);
6 __attribute__ ((noinline))
7 void foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c)
9 int i;
10 for(i = 0; i < 100; i+=4)
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];
20 int a[100], b[100], c[100];
21 int main()
23 #if (__SIZEOF_INT__ <= 2)
24 int i;
25 long res;
26 #else
27 int i, res;
28 #endif
29 for(i = 0; i < 100; i++)
31 b[i] = c[i] = i;
33 foo(a, b, c);
35 res = 0;
36 for(i = 0; i < 100; i++)
38 res += a[i];
40 if(res != 328350)
41 abort();
43 return 0;
46 /* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */
47 /* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target powerpc*-*-* } } } */
48 /* { dg-final { cleanup-rtl-dump "sms" } } */