2017-11-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / sms-12.c
blob581e1d751cf57adba3d9fa8c9afc3e99da0a2ba8
1 /* { dg-do run } */
2 /* { dg-skip-if "" { ! { aarch64*-*-* } } { "*" } { "" } } */
3 /* { dg-options "-O2 -fmodulo-sched -funroll-loops -fdump-rtl-sms --param sms-min-sc=1 -fmodulo-sched-allow-regmoves -fPIC" } */
5 extern void abort (void);
7 int X[1000]={0};
8 int Y[1000]={0};
10 extern void abort (void);
12 __attribute__ ((noinline))
13 int
14 foo (int len, long a)
16 int i;
17 long res = a;
19 len = 1000;
20 for (i = 0; i < len; i++)
21 res += X[i]* Y[i];
23 if (res != 601)
24 abort ();
28 int
29 main ()
31 X[0] = Y[1] = 2;
32 Y[0] = X[1] = 21;
33 X[2] = Y[3] = 3;
34 Y[2] = X[3] = 31;
35 X[4] = Y[5] = 4;
36 Y[4] = X[5] = 41;
38 foo (6, 3);
39 return 0;