| 1 |
/* Disabling epilogues until we find a better way to deal with scans. */ |
| 2 |
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */ |
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-require-effective-target vect_int } */ |
| 5 |
|
| 6 |
#include <stdarg.h> |
| 7 |
#include "tree-vect.h" |
| 8 |
|
| 9 |
#if VECTOR_BITS > 256 |
| 10 |
#define N (VECTOR_BITS / 16 + 10) |
| 11 |
#else |
| 12 |
#define N 26 |
| 13 |
#endif |
| 14 |
|
| 15 |
__attribute__ ((noinline)) |
| 16 |
unsigned int main1 () |
| 17 |
{ |
| 18 |
unsigned short i; |
| 19 |
unsigned int intsum = 0; |
| 20 |
|
| 21 |
/* vectorization of reduction with induction, and widenning sum: |
| 22 |
sum shorts into int. |
| 23 |
Need -fno-tree-scev-cprop or else the loop is eliminated. */ |
| 24 |
for (i = 0; i < N; i++) |
| 25 |
{ |
| 26 |
intsum += i; |
| 27 |
} |
| 28 |
|
| 29 |
return intsum; |
| 30 |
} |
| 31 |
|
| 32 |
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_hi_to_si } } } */ |
| 33 |
/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected(?:(?!Analysis failed).)*Analysis succeeded" 1 "vect" { target vect_widen_sum_hi_to_si } } } */ |