| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3 -mavx512bw -mtune=generic -fdump-tree-vect-optimized" } */ |
| 3 |
|
| 4 |
int test (signed char *data, int n) |
| 5 |
{ |
| 6 |
int sum = 0; |
| 7 |
for (int i = 0; i < n; ++i) |
| 8 |
sum += data[i]; |
| 9 |
return sum; |
| 10 |
} |
| 11 |
|
| 12 |
/* { dg-final { scan-tree-dump "loop vectorized using 64 byte vectors" "vect" } } */ |
| 13 |
/* { dg-final { scan-tree-dump "loop vectorized using 32 byte vectors" "vect" } } */ |
| 14 |
/* { dg-final { scan-tree-dump-not "loop vectorized using 16 byte vectors" "vect" } } */ |
| 15 |
/* { dg-final { scan-tree-dump-not "loop vectorized using 8 byte vectors" "vect" } } */ |