Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / simd / vqrdmulhh_lane_s16.c
blobf21863ab4681b13800732cd8f8f62cac6c735e8f
1 /* Test the vqrdmulhh_lane_s16 AArch64 SIMD intrinsic. */
3 /* { dg-do run } */
4 /* { dg-options "-save-temps -O3 -fno-inline" } */
6 #include "arm_neon.h"
7 #include <stdio.h>
9 extern void abort (void);
11 int
12 main (void)
14 int16_t arg1;
15 int16x4_t arg2;
16 int16_t result;
17 int16_t actual;
18 int16_t expected;
20 arg1 = -32768;
21 arg2 = vcreate_s16 (0xd78e000005d78000ULL);
22 actual = vqrdmulhh_lane_s16 (arg1, arg2, 3);
23 expected = 10354;
25 if (expected != actual)
27 fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
28 abort ();
31 return 0;
34 /* { dg-final { scan-assembler-times "sqrdmulh\[ \t\]+\[hH\]\[0-9\]+, ?\[hH\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[hH\]\\\[3\\\]\n" 1 } } */
35 /* { dg-final { cleanup-saved-temps } } */