| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target vect_int } */ |
| 3 |
/* { dg-options "--param=vect-partial-vector-usage=2 -O2" } */ |
| 4 |
/* { dg-additional-options "-mavx512vbmi2" { target { i?86-*-* x86_64-*-* } } } */ |
| 5 |
/* { dg-additional-options "-march=armv9-a" { target aarch64-*-* } } */ |
| 6 |
|
| 7 |
signed int __attribute__ ((noipa)) |
| 8 |
fn (signed int n, |
| 9 |
signed char *restrict a, |
| 10 |
signed char *restrict b, |
| 11 |
signed char *restrict c, |
| 12 |
signed char *restrict d) |
| 13 |
{ |
| 14 |
signed int res = 0; |
| 15 |
|
| 16 |
for (int i = 0; i < n; ++i) |
| 17 |
{ |
| 18 |
res += a[i] * b[i]; |
| 19 |
res += i + 1; |
| 20 |
res += c[i] * d[i]; |
| 21 |
} |
| 22 |
return res; |
| 23 |
} |