aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/aarch64/vqrdmulhh_lane_s16.c
blob: f21863ab4681b13800732cd8f8f62cac6c735e8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* Test the vqrdmulhh_lane_s16 AArch64 SIMD intrinsic.  */

/* { dg-do run } */
/* { dg-options "-save-temps -O3 -fno-inline" } */

#include "arm_neon.h"
#include <stdio.h>

extern void abort (void);

int
main (void)
{
  int16_t arg1;
  int16x4_t arg2;
  int16_t result;
  int16_t actual;
  int16_t expected;

  arg1 = -32768;
  arg2 = vcreate_s16 (0xd78e000005d78000ULL);
  actual = vqrdmulhh_lane_s16 (arg1, arg2, 3);
  expected = 10354;

  if (expected != actual)
    {
      fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
      abort ();
    }

  return 0;
}

/* { dg-final { scan-assembler-times "sqrdmulh\[ \t\]+\[hH\]\[0-9\]+, ?\[hH\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[hH\]\\\[3\\\]\n" 1 } } */
/* { dg-final { cleanup-saved-temps } } */