LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-cond-1.c
blob4bd286bf08c68961f78637693b05a092c8ffb0f7
1 /* { dg-require-effective-target vect_condition } */
2 /* { dg-additional-options "-fdump-tree-vect-details" } */
4 #include "tree-vect.h"
6 #define N 128
8 __attribute__((noinline, noclone)) void
9 foo (int *a, int stride)
11 int i;
13 for (i = 0; i < N/stride; i++, a += stride)
15 a[0] = a[0] ? 1 : 5;
16 a[1] = a[1] ? 2 : 6;
17 a[2] = a[2] ? 3 : 7;
18 a[3] = a[3] ? 4 : 8;
23 int a[N];
24 int main ()
26 int i;
28 check_vect ();
30 for (i = 0; i < N; i++)
32 a[i] = i;
33 asm volatile ("" ::: "memory");
36 foo (a, 4);
38 for (i = 1; i < N; i++)
39 if (a[i] != i%4 + 1)
40 abort ();
42 if (a[0] != 5)
43 abort ();
45 return 0;
48 /* { dg-final { scan-tree-dump {(no need for alias check [^\n]* when VF is 1|no alias between [^\n]* when [^\n]* is outside \(-16, 16\))} "vect" { target vect_element_align } } } */
49 /* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target vect_element_align } } } */