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