| 1 |
/* { dg-require-effective-target vect_int } */ |
| 2 |
|
| 3 |
#include "tree-vect.h" |
| 4 |
|
| 5 |
#define M 10 |
| 6 |
#define N 3 |
| 7 |
|
| 8 |
void __attribute__((noinline)) |
| 9 |
foo (int n, int *ub, int *uc) |
| 10 |
{ |
| 11 |
int i, j, tmp1; |
| 12 |
|
| 13 |
for (i = 0; i < n; i++) |
| 14 |
{ |
| 15 |
tmp1 = 0; |
| 16 |
for (j = 0; j < M; j++) |
| 17 |
{ |
| 18 |
tmp1 += uc[i] * ((int)(j << N) / M); |
| 19 |
} |
| 20 |
ub[i] = tmp1; |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
int main() |
| 25 |
{ |
| 26 |
int uc[16], ub[16]; |
| 27 |
check_vect (); |
| 28 |
foo (16, uc, ub); |
| 29 |
return 0; |
| 30 |
} |
| 31 |
|
| 32 |
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_int_mult } } } */ |