Create embedded-5_0-branch branch for development on ARM embedded cores.
[official-gcc.git] / embedded-5_0-branch / gcc / testsuite / gcc.target / aarch64 / simd / vzipqp16.x
blob640d7a2513f302d8caa821c3621f3c9fecd38538
1 extern void abort (void);
3 poly16x8x2_t
4 test_vzipqp16 (poly16x8_t _a, poly16x8_t _b)
6   return vzipq_p16 (_a, _b);
9 int
10 main (int argc, char **argv)
12   int i;
13   poly16_t first[] = {1, 2, 3, 4, 5, 6, 7, 8};
14   poly16_t second[] = {9, 10, 11, 12, 13, 14, 15, 16};
15   poly16x8x2_t result = test_vzipqp16 (vld1q_p16 (first), vld1q_p16 (second));
16   poly16x8_t res1 = result.val[0], res2 = result.val[1];
17   poly16_t exp1[] = {1, 9, 2, 10, 3, 11, 4, 12};
18   poly16_t exp2[] = {5, 13, 6, 14, 7, 15, 8, 16};
19   poly16x8_t expected1 = vld1q_p16 (exp1);
20   poly16x8_t expected2 = vld1q_p16 (exp2);
22   for (i = 0; i < 8; i++)
23     if ((res1[i] != expected1[i]) || (res2[i] != expected2[i]))
24       abort ();
26   return 0;