LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-vfa-vect-depend-2.c
blobacad8fc033268e5bd2728a617dbc61d9e4ae8c48
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 17
8 int ia[N] = {48,45,42,39,36,33,30,27,24,21,18,15,12,9,6,3,0};
9 int ib[N] = {48,45,42,39,36,33,30,27,24,21,18,15,12,9,6,3,0};
10 int res[N] = {48,192,180,168,156,144,132,120,108,96,84,72,60,48,36,24,12};
12 __attribute__ ((noinline))
13 int main1 ()
15 int i;
17 /* Not vectorizable due to data dependence: dependence distance 1. */
18 for (i = N - 2; i >= 0; i--)
20 ia[i] = ia[i+1] * 4;
23 /* check results: */
24 for (i = 0; i < N; i++)
26 if (ia[i] != 0)
27 abort ();
30 /* Vectorizable. Dependence distance -1. */
31 for (i = N - 2; i >= 0; i--)
33 ib[i+1] = ib[i] * 4;
36 /* check results: */
37 for (i = 0; i < N; i++)
39 if (ib[i] != res[i])
40 abort ();
43 return 0;
46 int main (void)
48 check_vect ();
50 return main1 ();
53 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
54 /* Requires reverse for variable-length SVE, which is implemented for
55 by a later patch. Until then we report it twice, once for SVE and
56 once for 128-bit Advanced SIMD. */
57 /* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" { xfail { aarch64_sve && vect_variable_length } } } } */