summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/simd/vrev64qp16.x
blob: 5bce38c8aaf9636782edcf877ee74e79160f5e6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
extern void abort (void);

poly16x8_t
test_vrev64qp16 (poly16x8_t _arg)
{
  return vrev64q_p16 (_arg);
}

int
main (int argc, char **argv)
{
  int i;
  poly16x8_t inorder = {1, 2, 3, 4, 5, 6, 7, 8};
  poly16x8_t reversed = test_vrev64qp16 (inorder);
  poly16x8_t expected = {4, 3, 2, 1, 8, 7, 6, 5};

  for (i = 0; i < 8; i++)
    if (reversed[i] != expected[i])
      abort ();
  return 0;
}