Add execution + assembler tests of AArch64 REV Neon Intrinsics.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / simd / vrev16qp8.x
blob318ea7cca650788733987d455791e4fc8dac54f3
1 extern void abort (void);
3 poly8x16_t
4 test_vrev16qp8 (poly8x16_t _arg)
6   return vrev16q_p8 (_arg);
9 int
10 main (int argc, char **argv)
12   int i;
13   poly8x16_t inorder = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
14   poly8x16_t reversed = test_vrev16qp8 (inorder);
15   poly8x16_t expected = {2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15};
17   for (i = 0; i < 16; i++)
18     if (reversed[i] != expected[i])
19       abort ();
20   return 0;