New Advanced SIMD intrinsics tests.
[platform/upstream/gcc49.git] / gcc / testsuite / gcc.target / aarch64 / advsimd-intrinsics / vand.c
1 #define INSN_NAME vand
2 #define TEST_MSG "VAND/VANDQ"
3
4 #include "binary_op.inc"
5
6 /* Expected results.  */
7 VECT_VAR_DECL(expected,int,8,8) [] = { 0x0, 0x0, 0x2, 0x2,
8                                        0x0, 0x0, 0x2, 0x2 };
9 VECT_VAR_DECL(expected,int,16,4) [] = { 0xfff0, 0xfff0, 0xfff0, 0xfff0 };
10 VECT_VAR_DECL(expected,int,32,2) [] = { 0x0, 0x1 };
11 VECT_VAR_DECL(expected,int,64,1) [] = { 0x60 };
12 VECT_VAR_DECL(expected,uint,8,8) [] = { 0x10, 0x10, 0x10, 0x10,
13                                         0x14, 0x14, 0x14, 0x14 };
14 VECT_VAR_DECL(expected,uint,16,4) [] = { 0x10, 0x10, 0x12, 0x12 };
15 VECT_VAR_DECL(expected,uint,32,2) [] = { 0x20, 0x20 };
16 VECT_VAR_DECL(expected,uint,64,1) [] = { 0x0 };
17 VECT_VAR_DECL(expected,poly,8,8) [] = { 0x33, 0x33, 0x33, 0x33,
18                                         0x33, 0x33, 0x33, 0x33 };
19 VECT_VAR_DECL(expected,poly,16,4) [] = { 0x3333, 0x3333, 0x3333, 0x3333 };
20 VECT_VAR_DECL(expected,hfloat,32,2) [] = { 0x33333333, 0x33333333 };
21 VECT_VAR_DECL(expected,int,8,16) [] = { 0xf0, 0xf0, 0xf2, 0xf2,
22                                         0xf4, 0xf4, 0xf6, 0xf6,
23                                         0xf0, 0xf0, 0xf2, 0xf2,
24                                         0xf4, 0xf4, 0xf6, 0xf6 };
25 VECT_VAR_DECL(expected,int,16,8) [] = { 0xffe0, 0xffe0, 0xffe0, 0xffe0,
26                                         0xffe4, 0xffe4, 0xffe4, 0xffe4 };
27 VECT_VAR_DECL(expected,int,32,4) [] = { 0xffffffe0, 0xffffffe0,
28                                         0xffffffe2, 0xffffffe2 };
29 VECT_VAR_DECL(expected,int,64,2) [] = { 0x10, 0x10 };
30 VECT_VAR_DECL(expected,uint,8,16) [] = { 0x0, 0x0, 0x0, 0x0,
31                                          0x4, 0x4, 0x4, 0x4,
32                                          0x8, 0x8, 0x8, 0x8,
33                                          0xc, 0xc, 0xc, 0xc };
34 VECT_VAR_DECL(expected,uint,16,8) [] = { 0x0, 0x1, 0x2, 0x3,
35                                          0x0, 0x1, 0x2, 0x3 };
36 VECT_VAR_DECL(expected,uint,32,4) [] = { 0x30, 0x31, 0x32, 0x33 };
37 VECT_VAR_DECL(expected,uint,64,2) [] = { 0x0, 0x1 };
38 VECT_VAR_DECL(expected,poly,8,16) [] = { 0x33, 0x33, 0x33, 0x33,
39                                          0x33, 0x33, 0x33, 0x33,
40                                          0x33, 0x33, 0x33, 0x33,
41                                          0x33, 0x33, 0x33, 0x33 };
42 VECT_VAR_DECL(expected,poly,16,8) [] = { 0x3333, 0x3333, 0x3333, 0x3333,
43                                          0x3333, 0x3333, 0x3333, 0x3333 };
44 VECT_VAR_DECL(expected,hfloat,32,4) [] = { 0x33333333, 0x33333333,
45                                            0x33333333, 0x33333333 };