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