LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-outer-14.c
blob411cc8fea4d9b13afc1ef5e4657e594eceff1da1
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 64
8 __attribute__ ((noinline)) unsigned short
9 foo (short scale){
10 int i;
11 unsigned short j;
12 unsigned short sum = 0;
13 unsigned short sum_j;
15 for (i = 0; i < N; i++) {
16 sum_j = 0;
17 for (j = 0; j < N; j++) {
18 sum_j += j;
20 sum += sum_j;
22 return sum;
25 __attribute__ ((noinline)) unsigned short
26 bar (void)
28 unsigned short j;
29 unsigned short sum_j;
30 sum_j = 0;
31 for (j = 0; j < N; j++) {
32 sum_j += j;
34 return sum_j;
37 int main (void)
39 int i;
40 unsigned short j, sum_j;
41 unsigned short sum = 0;
42 unsigned short res;
44 check_vect ();
46 res = foo (2);
48 /* check results: */
49 for (i=0; i<N; i++)
51 sum_j = bar();
52 sum += sum_j;
54 if (res != sum)
55 abort ();
57 return 0;
60 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { target vect_widen_mult_hi_to_si } } } */