Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/simd/vqdmulhs_lane_s32.c

raw
1 /* Test the vqdmulhs_lane_s32 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 int32_t __attribute__((noipa))
12 test_vqdmulhs_0 (int32_t arg1, int32x2_t arg2)
13 {
14 return vqdmulhs_lane_s32 (arg1, arg2, 0);
15 }
16
17 int32_t __attribute__((noipa))
18 test_vqdmulhs_1 (int32_t arg1, int32x2_t arg2)
19 {
20 return vqdmulhs_lane_s32 (arg1, arg2, 1);
21 }
22
23 int
24 main (void)
25 {
26 int32_t actual;
27 int32_t expected;
28
29 actual = test_vqdmulhs_0 (57336, vcreate_s32 (0x55897fff7fff0000ULL));
30 expected = 57334;
31
32 if (expected != actual)
33 {
34 fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
35 abort ();
36 }
37
38 actual = test_vqdmulhs_1 (57336, vcreate_s32 (0x55897fff7fff0000ULL));
39 expected = 38315;
40
41 if (expected != actual)
42 {
43 fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
44 abort ();
45 }
46
47 return 0;
48 }
49 /* { dg-final { scan-assembler-times "sqdmulh\[ \t\]+\[sS\]\[0-9\]+, ?\[sS\]\[0-9\]+, ?(?:\[sS\]\[0-9\]+|\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\])\n" 1 } } */
50 /* { dg-final { scan-assembler-times "sqdmulh\[ \t\]+\[sS\]\[0-9\]+, ?\[sS\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[sS\]\\\[1\\\]\n" 1 } } */