1 extern void abort (void);
2 
3 int32x2x2_t
test_vtrns32(int32x2_t _a,int32x2_t _b)4 test_vtrns32 (int32x2_t _a, int32x2_t _b)
5 {
6   return vtrn_s32 (_a, _b);
7 }
8 
9 int
main(int argc,char ** argv)10 main (int argc, char **argv)
11 {
12   int i;
13   int32_t first[] = {1, 2};
14   int32_t second[] = {3, 4};
15   int32x2x2_t result = test_vtrns32 (vld1_s32 (first), vld1_s32 (second));
16   int32x2_t res1 = result.val[0], res2 = result.val[1];
17   int32_t exp1[] = {1, 3};
18   int32_t exp2[] = {2, 4};
19   int32x2_t expected1 = vld1_s32 (exp1);
20   int32x2_t expected2 = vld1_s32 (exp2);
21 
22   for (i = 0; i < 2; i++)
23     if ((res1[i] != expected1[i]) || (res2[i] != expected2[i]))
24       abort ();
25 
26   return 0;
27 }
28