SVE Intrinsics: Change return type of redirect_call to gcall.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-pr101668.c
blob147286a6f3ef5de069d1da46fa7cc603bbc94e79
1 /* { dg-additional-options "-w -Wno-psabi" } */
3 #include "tree-vect.h"
5 typedef int v4si __attribute__((vector_size(16)));
6 typedef int v8si __attribute__((vector_size(32)));
8 void __attribute__((noipa)) test_lo (v4si *dst, v8si src)
10 (*dst)[0] = src[0];
11 (*dst)[1] = src[1];
12 (*dst)[2] = src[2];
13 (*dst)[3] = src[3];
16 void __attribute__((noipa)) test_hi (v4si *dst, v8si src)
18 (*dst)[0] = src[4];
19 (*dst)[1] = src[5];
20 (*dst)[2] = src[6];
21 (*dst)[3] = src[7];
24 void __attribute__((noipa)) test_even (v4si *dst, v8si src)
26 (*dst)[0] = src[0];
27 (*dst)[1] = src[2];
28 (*dst)[2] = src[4];
29 (*dst)[3] = src[6];
32 void __attribute__((noipa)) test_odd (v4si *dst, v8si src)
34 (*dst)[0] = src[1];
35 (*dst)[1] = src[3];
36 (*dst)[2] = src[5];
37 (*dst)[3] = src[7];
40 int main()
42 check_vect ();
43 v8si v = (v8si) { 0, 1, 2, 3, 4, 5, 6, 7 };
44 v4si dst;
45 test_lo (&dst, v);
46 if (dst[0] != 0 || dst[1] != 1 || dst[2] != 2 || dst[3] != 3)
47 abort ();
48 test_hi (&dst, v);
49 if (dst[0] != 4 || dst[1] != 5 || dst[2] != 6 || dst[3] != 7)
50 abort ();
51 test_even (&dst, v);
52 if (dst[0] != 0 || dst[1] != 2 || dst[2] != 4 || dst[3] != 6)
53 abort ();
54 test_odd (&dst, v);
55 if (dst[0] != 1 || dst[1] != 3 || dst[2] != 5 || dst[3] != 7)
56 abort ();
57 return 0;