| 1 |
// { dg-do compile } |
| 2 |
// { dg-require-effective-target vect_int } |
| 3 |
|
| 4 |
static int op (const int& x, const int& y) { return x + y; } |
| 5 |
|
| 6 |
void foo(int* a) |
| 7 |
{ |
| 8 |
for (int i = 0; i < 1000; ++i) |
| 9 |
a[i] = op(a[i], 1); |
| 10 |
} |
| 11 |
|
| 12 |
// { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } |