| 1 |
/* Test the vqdmulhh_lane_s16 AArch64 SIMD intrinsic. */ |
| 2 |
|
| 3 |
/* { dg-do run } */ |
| 4 |
/* { dg-options "-save-temps -O3" } */ |
| 5 |
|
| 6 |
#include "arm_neon.h" |
| 7 |
#include <stdio.h> |
| 8 |
|
| 9 |
extern void abort (void); |
| 10 |
|
| 11 |
int16_t __attribute__((noipa)) |
| 12 |
test_vqdmulhh (int16_t arg1, int16x4_t arg2) |
| 13 |
{ |
| 14 |
return vqdmulhh_lane_s16 (arg1, arg2, 2); |
| 15 |
} |
| 16 |
|
| 17 |
int |
| 18 |
main (void) |
| 19 |
{ |
| 20 |
int16_t actual; |
| 21 |
int16_t expected; |
| 22 |
|
| 23 |
actual = test_vqdmulhh (-32768, vcreate_s16 (0x0000ffff2489e398ULL)); |
| 24 |
expected = 1; |
| 25 |
|
| 26 |
if (expected != actual) |
| 27 |
{ |
| 28 |
fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual); |
| 29 |
abort (); |
| 30 |
} |
| 31 |
|
| 32 |
return 0; |
| 33 |
} |
| 34 |
|
| 35 |
|
| 36 |
/* { dg-final { scan-assembler-times "sqdmulh\[ \t\]+\[hH\]\[0-9\]+, ?\[hH\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[hH\]\\\[2\\\]\n" 1 } } */ |