* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / vect / simd-clone-4.cc
blob32bdfd446ae2c46e7dfd7d162ea40565bee4c7c9
1 // { dg-require-effective-target vect_simd_clones }
2 // { dg-additional-options "-fopenmp-simd -fno-inline -DONE_FILE" }
3 // { dg-additional-options "-mavx" { target avx_runtime } }
5 #include "../../gcc.dg/vect/tree-vect.h"
7 #ifdef ONE_FILE
8 #include "simd-clone-5.cc"
9 #else
10 #include "simd-clone-4.h"
11 #endif
13 T<0> b __attribute__((aligned (32)));
15 void
16 do_main ()
18 int i, r = 0;
19 S<0> a[64];
20 for (i = 0; i < 64; i++)
22 a[i].s = i;
23 b.t[i] = i;
25 #pragma omp simd reduction(+:r)
26 for (i = 0; i < 64; i++)
27 r += a[16].f0 (i);
28 if (r != 64 * 63 / 2 + 64 * 16)
29 __builtin_abort ();
30 r = 0;
31 #pragma omp simd reduction(+:r)
32 for (i = 0; i < 64; i++)
33 r += a[32].f1 (i);
34 if (r != 64 * 63 / 2 + 64 * 32)
35 __builtin_abort ();
36 r = 0;
37 #pragma omp simd reduction(+:r)
38 for (i = 0; i < 64; i++)
39 r += a[i].f2 (i);
40 if (r != 64 * 63)
41 __builtin_abort ();
42 r = 0;
43 #pragma omp simd reduction(+:r)
44 for (i = 0; i < 64; i++)
45 r += b.f3 (i);
46 if (r != 64 * 63 / 2)
47 __builtin_abort ();
50 int
51 main ()
53 check_vect ();
54 do_main ();