| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-ftree-vectorize -fno-vect-cost-model" } */ |
| 3 |
/* { dg-additional-options "-mavx512f" { target x86_64-*-* i?86-*-* } } */ |
| 4 |
|
| 5 |
static inline int |
| 6 |
foo (int y, int a) |
| 7 |
{ |
| 8 |
return (y && a) ? a : 0; |
| 9 |
} |
| 10 |
|
| 11 |
void |
| 12 |
bar (int *__restrict a, int *__restrict d, int *__restrict e, int i) |
| 13 |
{ |
| 14 |
while (i < 1) |
| 15 |
{ |
| 16 |
e[8] = e[7] = e[6] = e[5] = e[4] = e[3] = e[2] = e[1] = e[0] |
| 17 |
= foo (d[8], a[8]); |
| 18 |
e[9] = foo (d[9], a[9]); |
| 19 |
e[10] = foo (d[0], a[0]); |
| 20 |
e[11] = foo (d[1], a[1]); |
| 21 |
e[12] = foo (d[12], a[12]); |
| 22 |
e[13] = foo (d[13], a[13]); |
| 23 |
e[14] = foo (d[4], a[4]); |
| 24 |
e[15] = foo (d[15], a[15]); |
| 25 |
|
| 26 |
a += 16; |
| 27 |
e += 1; |
| 28 |
i += 1; |
| 29 |
} |
| 30 |
} |