Add execution + assembler tests of AArch64 UZP Intrinsics.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / simd / vuzps32.x
blob6f885ce083bd19c7e83ffe2f4a75a529ae5ae4d2
1 extern void abort (void);
3 int32x2x2_t
4 test_vuzps32 (int32x2_t _a, int32x2_t _b)
6   return vuzp_s32 (_a, _b);
9 int
10 main (int argc, char **argv)
12   int i;
13   int32_t first[] = {1, 2};
14   int32_t second[] = {3, 4};
15   int32x2x2_t result = test_vuzps32 (vld1_s32 (first), vld1_s32 (second));
16   int32_t exp1[] = {1, 3};
17   int32_t exp2[] = {2, 4};
18   int32x2_t expect1 = vld1_s32 (exp1);
19   int32x2_t expect2 = vld1_s32 (exp2);
21   for (i = 0; i < 2; i++)
22     if ((result.val[0][i] != expect1[i]) || (result.val[1][i] != expect2[i]))
23       abort ();
25   return 0;