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