LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-17.c
blobc20e0ff3057f4340f26f02cdcd4c79e81cd920af
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 unsigned int b[N];
9 unsigned int out[N];
10 unsigned int in[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
12 __attribute__ ((noinline)) int
13 main1 (unsigned int x, unsigned int y)
15 int i;
16 unsigned int a0, a1, a2, a3;
18 if (x > y)
19 x = x + y;
20 else
21 y = x;
23 a0 = in[0] + 23;
24 a1 = in[1] + 142;
25 a2 = in[2] + 2;
26 a3 = in[3] + 31;
28 b[0] = a0;
29 b[1] = a1;
31 out[0] = a0 * x;
32 out[1] = a1 * y;
33 out[2] = a2 * x;
34 out[3] = a3 * y;
36 if (x)
37 __asm__ volatile ("" : : : "memory");
39 /* Check results. */
40 if (out[0] != (in[0] + 23) * x
41 || out[1] != (in[1] + 142) * y
42 || out[2] != (in[2] + 2) * x
43 || out[3] != (in[3] + 31) * y
44 || b[0] != in[0] + 23
45 || b[1] != in[1] + 142)
46 abort();
48 return 0;
51 int main (void)
53 check_vect ();
55 main1 (2, 3);
57 return 0;
60 /* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" { target vect_int_mult } } } */