blob: 8a245f286c799469eea988bfdf4e460f55e24f38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/* { dg-do run } */
/* { dg-options "-O2 -fmodulo-sched -funroll-loops -fdump-rtl-sms --param sms-min-sc=1 -fmodulo-sched-allow-regmoves" } */
extern void abort (void);
int X[1000]={0};
int Y[1000]={0};
extern void abort (void);
__attribute__ ((noinline))
int
foo (int len, long a)
{
int i;
long res = a;
len = 1000;
for (i = 0; i < len; i++)
res += X[i]* Y[i];
if (res != 601)
abort ();
}
int
main ()
{
X[0] = Y[1] = 2;
Y[0] = X[1] = 21;
X[2] = Y[3] = 3;
Y[2] = X[3] = 31;
X[4] = Y[5] = 4;
Y[4] = X[5] = 41;
foo (6, 3);
return 0;
}
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */
|