Enable gcc.dg/vect/vect-early-break_21.c on x86_64
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / advsimd-intrinsics / vmovl.c
blobfd94d72ebd75ef56a6a9df29036b6a533f0e6562
1 #include <arm_neon.h>
2 #include "arm-neon-ref.h"
3 #include "compute-ref-data.h"
5 /* Expected results. */
6 VECT_VAR_DECL(expected,int,16,8) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3,
7 0xfff4, 0xfff5, 0xfff6, 0xfff7 };
8 VECT_VAR_DECL(expected,int,32,4) [] = { 0xfffffff0, 0xfffffff1,
9 0xfffffff2, 0xfffffff3 };
10 VECT_VAR_DECL(expected,int,64,2) [] = { 0xfffffffffffffff0,
11 0xfffffffffffffff1 };
12 VECT_VAR_DECL(expected,uint,16,8) [] = { 0xf0, 0xf1, 0xf2, 0xf3,
13 0xf4, 0xf5, 0xf6, 0xf7 };
14 VECT_VAR_DECL(expected,uint,32,4) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3 };
15 VECT_VAR_DECL(expected,uint,64,2) [] = { 0xfffffff0, 0xfffffff1 };
17 #define TEST_MSG "VMOVL"
18 void exec_vmovl (void)
20 /* Basic test: vec128=vmovl(vec64), then store the result. */
21 #define TEST_VMOVL(T1, T2, W, W2, N) \
22 VECT_VAR(vector128, T1, W2, N) = \
23 vmovl_##T2##W(VECT_VAR(vector64, T1, W, N)); \
24 vst1q_##T2##W2(VECT_VAR(result, T1, W2, N), VECT_VAR(vector128, T1, W2, N))
26 DECL_VARIABLE_64BITS_VARIANTS(vector64);
27 DECL_VARIABLE_128BITS_VARIANTS(vector128);
29 TEST_MACRO_64BITS_VARIANTS_2_5(VLOAD, vector64, buffer);
31 clean_results ();
33 TEST_VMOVL(int, s, 8, 16, 8);
34 TEST_VMOVL(int, s, 16, 32, 4);
35 TEST_VMOVL(int, s, 32, 64, 2);
36 TEST_VMOVL(uint, u, 8, 16, 8);
37 TEST_VMOVL(uint, u, 16, 32, 4);
38 TEST_VMOVL(uint, u, 32, 64, 2);
40 CHECK(TEST_MSG, int, 16, 8, PRIx16, expected, "");
41 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected, "");
42 CHECK(TEST_MSG, int, 64, 2, PRIx64, expected, "");
43 CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected, "");
44 CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected, "");
45 CHECK(TEST_MSG, uint, 64, 2, PRIx64, expected, "");
48 int main (void)
50 exec_vmovl ();
51 return 0;