libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr99412.c
blobe3e94a052ca13a2ec56fec235a9702dc5d72c1be
1 /* { dg-do compile } */
2 /* { dg-additional-options "-Ofast --param vect-epilogues-nomask=0" } */
3 /* { dg-require-effective-target vect_float } */
5 /* From TSVC s352. */
7 typedef float real_t;
9 #define LEN_1D 32000
10 #define LEN_2D 256
12 real_t a[LEN_1D],b[LEN_1D];
13 real_t foo ()
15 real_t dot = (real_t)0.;
16 for (int i = 0; i < LEN_1D; i += 5) {
17 dot = dot + a[i] * b[i] + a[i + 1] * b[i + 1] + a[i + 2]
18 * b[i + 2] + a[i + 3] * b[i + 3] + a[i + 4] * b[i + 4];
21 return dot;
24 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */