| 1 |
/* { dg-require-effective-target vect_int } */ |
| 2 |
|
| 3 |
#include <stdarg.h> |
| 4 |
#include "tree-vect.h" |
| 5 |
|
| 6 |
#define N 16 |
| 7 |
|
| 8 |
__attribute__ ((noinline)) int main1 (short a, short *b) |
| 9 |
{ |
| 10 |
while (++a < 4) *b++ = 2; |
| 11 |
|
| 12 |
return 0; |
| 13 |
} |
| 14 |
|
| 15 |
int main (void) |
| 16 |
{ |
| 17 |
int i = 0; |
| 18 |
short x[N]; |
| 19 |
|
| 20 |
check_vect (); |
| 21 |
|
| 22 |
main1 (0, x); |
| 23 |
|
| 24 |
/* check results: */ |
| 25 |
#pragma GCC novector |
| 26 |
while (++i < 4) |
| 27 |
{ |
| 28 |
if (x[i-1] != 2) |
| 29 |
abort (); |
| 30 |
} |
| 31 |
|
| 32 |
return 0; |
| 33 |
} |
| 34 |
|
| 35 |
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ |