| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-fno-tree-forwprop -fno-tree-vrp" } |
| 3 |
/* { dg-require-effective-target vect_int } */ |
| 4 |
|
| 5 |
#include "tree-vect.h" |
| 6 |
|
| 7 |
#if VECTOR_BITS > 128 |
| 8 |
#define N (VECTOR_BITS / 2) |
| 9 |
#else |
| 10 |
#define N 64 |
| 11 |
#endif |
| 12 |
|
| 13 |
int a[N], b[N], c[N]; |
| 14 |
|
| 15 |
void |
| 16 |
foo () |
| 17 |
{ |
| 18 |
int i; |
| 19 |
for (i = 0; i < N; i++) |
| 20 |
{ |
| 21 |
long long d = a[i]; |
| 22 |
long long e = b[i]; |
| 23 |
d += e; |
| 24 |
c[i] = d; |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
/* { dg-final { scan-tree-dump {vect_recog_over_widening_pattern: detected:[^\n]* \+} "vect" } } */ |
| 29 |
/* { dg-final { scan-tree-dump {VIEW_CONVERT_EXPR<vector[^ ]* unsigned} "vect" } } */ |
| 30 |
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ |