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