Add execution + assembler tests of AArch64 UZP Intrinsics.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / simd / vuzpp16.x
blobbc45efcd96526f98b40abf3bb2bf2a26d11aac3b
1 extern void abort (void);
3 poly16x4x2_t
4 test_vuzpp16 (poly16x4_t _a, poly16x4_t _b)
6   return vuzp_p16 (_a, _b);
9 int
10 main (int argc, char **argv)
12   int i;
13   poly16_t first[] = {1, 2, 3, 4};
14   poly16_t second[] = {5, 6, 7, 8};
15   poly16x4x2_t result = test_vuzpp16 (vld1_p16 (first), vld1_p16 (second));
16   poly16_t exp1[] = {1, 3, 5, 7};
17   poly16_t exp2[] = {2, 4, 6, 8};
18   poly16x4_t expect1 = vld1_p16 (exp1);
19   poly16x4_t expect2 = vld1_p16 (exp2);
21   for (i = 0; i < 4; i++)
22     if ((result.val[0][i] != expect1[i]) || (result.val[1][i] != expect2[i]))
23       abort ();
25   return 0;