testsuite: Revert to the original version of pr100056.c
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-reduc-pattern-1c-big-array.c
blob7876f08ae6ed5af368f9d285415e38c03e8f51d2
1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
3 /* { dg-require-effective-target vect_int } */
5 #include <stdarg.h>
6 #include "tree-vect.h"
8 #define N 128
9 unsigned char udata_ch[N];
10 #define SUM N*(N-1)
12 __attribute__ ((noinline)) int
13 foo ()
15 int i;
16 unsigned short shortsum = 0;
18 for (i = 0; i < N; i++)
20 udata_ch[i] = i*2;
21 asm volatile ("" ::: "memory");
24 /* widenning sum: sum chars into short. */
25 for (i = 0; i < N; i++)
27 shortsum += udata_ch[i];
30 /* check results: */
31 if (shortsum != SUM)
32 abort ();
34 return 0;
37 int
38 main (void)
40 check_vect ();
41 return foo ();
44 /* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected(?:(?!Analysis failed).)*Analysis succeeded" 1 "vect" { target vect_widen_sum_qi_to_hi } } } */
45 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_qi_to_hi } } } */
46 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_widen_sum_qi_to_hi } } } } */