libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-vect-iv-3.c
blobf268d4a5131ad11404bd9fcf8dacd4ad28b77e6d
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 } */
6 #include <stdarg.h>
7 #include "tree-vect.h"
9 #if VECTOR_BITS > 256
10 #define N (VECTOR_BITS / 16 + 10)
11 #else
12 #define N 26
13 #endif
15 __attribute__ ((noinline))
16 unsigned int main1 ()
18 unsigned short i;
19 unsigned int intsum = 0;
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++)
26 intsum += i;
29 return intsum;
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 } } } */