| 1 |
/* { dg-additional-options "--param vect-partial-vector-usage=1" } */ |
| 2 |
/* { dg-additional-options "-mavx512bw -mavx512vl" { target avx512f_runtime } } */ |
| 3 |
|
| 4 |
#include "tree-vect.h" |
| 5 |
|
| 6 |
static const double a[] = { 1., 2., 3., 4., 5. }; |
| 7 |
|
| 8 |
void __attribute__((noipa)) |
| 9 |
foo (double *b, double *bp, double c, int n) |
| 10 |
{ |
| 11 |
for (int i = 0; i < n; ++i) |
| 12 |
b[i] = bp[i] = a[i] * c; |
| 13 |
} |
| 14 |
|
| 15 |
int main() |
| 16 |
{ |
| 17 |
double b[6], bp[6]; |
| 18 |
b[5] = bp[5] = 13.; |
| 19 |
check_vect (); |
| 20 |
foo (b, bp, 3., 5); |
| 21 |
if (b[5] != 13. || bp[5] != 13.) |
| 22 |
abort (); |
| 23 |
return 0; |
| 24 |
} |