* gcc.dg/vect/vect-reduc-1.c: Add cleanup-tree-dump.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-reduc-3.c
blob89372547b052f7cb23c4e728862d760b06d900c6
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
7 #define DIFF 240
9 /* Test vectorization of reduction of unsigned-int in the presence
10 of unknown-loop-bound. */
12 int main1 (int n)
14 int i;
15 unsigned int ub[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
16 unsigned int uc[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
17 unsigned int udiff;
19 udiff = 0;
20 for (i = 0; i < n; i++) {
21 udiff += (ub[i] - uc[i]);
24 /* check results: */
25 if (udiff != DIFF)
26 abort ();
28 return 0;
31 int main (void)
33 check_vect ();
35 return main1 (N);
36 return main1 (N-1);
39 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail {! vect_reduction} } } } */
40 /* { dg-final { cleanup-tree-dump "vect" } } */