Implement C _FloatN, _FloatNx types.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr45720.c
blob9de8d1117f678d974ceffdfdea35270333b998d2
1 /* { dg-do run } */
2 /* { dg-options "-ftree-vectorize" } */
4 float val[256];
5 float x;
6 void __attribute__((noinline,noclone))
7 foo(int len, int beg)
9 int i;
10 for (i = len - 1; i >= beg; --i)
11 x += val[i] * 2;
13 void __attribute__((noinline,noclone))
14 bar(void)
16 int i;
17 for (i = 255; i >= 0; --i)
18 x += val[i] * 2;
19 for (i = 254; i >= 0; --i)
20 x += val[i] * 2;
21 for (i = 253; i >= 0; --i)
22 x += val[i] * 2;
23 for (i = 252; i >= 0; --i)
24 x += val[i] * 2;
26 float y[256];
27 void __attribute__((noinline,noclone))
28 foobar(void)
30 int i;
31 for (i = 0; i < 252; ++i)
33 float l = 0;
34 l += val[255 - i] * 2;
35 l += val[254 - i] * 2;
36 l += val[253 - i] * 2;
37 l += val[252 - i] * 2;
38 y[i] = l;
41 int main()
43 foo(256-1, 0);
44 foo(256-2, 0);
45 foo(256-3, 0);
46 foo(256-4, 0);
47 bar();
48 foobar();
49 return 0;