Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c

raw
1 /* { dg-do assemble { target { aarch64*-*-* } } } */
2 /* { dg-require-effective-target arm_v8_2a_i8mm_ok } */
3 /* { dg-add-options arm_v8_2a_i8mm } */
4 /* { dg-additional-options "-save-temps" } */
5 /* { dg-final { check-function-bodies "**" "" {-O[^0]} } } */
6 /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } } */
7
8 #include <arm_neon.h>
9
10 /* Unsigned-Signed Dot Product instructions. */
11
12 /*
13 **ufoo:
14 ** usdot v0\.2s, v1\.8b, v2\.8b
15 ** ret
16 */
17 int32x2_t ufoo (int32x2_t r, uint8x8_t x, int8x8_t y)
18 {
19 return vusdot_s32 (r, x, y);
20 }
21
22 /*
23 **ufooq:
24 ** usdot v0\.4s, v1\.16b, v2\.16b
25 ** ret
26 */
27 int32x4_t ufooq (int32x4_t r, uint8x16_t x, int8x16_t y)
28 {
29 return vusdotq_s32 (r, x, y);
30 }
31
32 /*
33 **ufoo_lane:
34 ** usdot v0\.2s, v1\.8b, v2\.4b\[0\]
35 ** ret
36 */
37 int32x2_t ufoo_lane (int32x2_t r, uint8x8_t x, int8x8_t y)
38 {
39 return vusdot_lane_s32 (r, x, y, 0);
40 }
41
42 /*
43 **ufoo_laneq:
44 ** usdot v0\.2s, v1\.8b, v2\.4b\[2\]
45 ** ret
46 */
47 int32x2_t ufoo_laneq (int32x2_t r, uint8x8_t x, int8x16_t y)
48 {
49 return vusdot_laneq_s32 (r, x, y, 2);
50 }
51
52 /*
53 **ufooq_lane:
54 ** usdot v0\.4s, v1\.16b, v2\.4b\[1\]
55 ** ret
56 */
57 int32x4_t ufooq_lane (int32x4_t r, uint8x16_t x, int8x8_t y)
58 {
59 return vusdotq_lane_s32 (r, x, y, 1);
60 }
61
62 /*
63 **ufooq_laneq:
64 ** usdot v0\.4s, v1\.16b, v2\.4b\[3\]
65 ** ret
66 */
67 int32x4_t ufooq_laneq (int32x4_t r, uint8x16_t x, int8x16_t y)
68 {
69 return vusdotq_laneq_s32 (r, x, y, 3);
70 }
71
72
73 /* Signed-Unsigned Dot Product instructions. */
74
75 /*
76 **sfoo_lane:
77 ** sudot v0\.2s, v1\.8b, v2\.4b\[0\]
78 ** ret
79 */
80 int32x2_t sfoo_lane (int32x2_t r, int8x8_t x, uint8x8_t y)
81 {
82 return vsudot_lane_s32 (r, x, y, 0);
83 }
84
85 /*
86 **sfoo_laneq:
87 ** sudot v0\.2s, v1\.8b, v2\.4b\[2\]
88 ** ret
89 */
90 int32x2_t sfoo_laneq (int32x2_t r, int8x8_t x, uint8x16_t y)
91 {
92 return vsudot_laneq_s32 (r, x, y, 2);
93 }
94
95 /*
96 **sfooq_lane:
97 ** sudot v0\.4s, v1\.16b, v2\.4b\[1\]
98 ** ret
99 */
100 int32x4_t sfooq_lane (int32x4_t r, int8x16_t x, uint8x8_t y)
101 {
102 return vsudotq_lane_s32 (r, x, y, 1);
103 }
104
105 /*
106 **sfooq_laneq:
107 ** sudot v0\.4s, v1\.16b, v2\.4b\[3\]
108 ** ret
109 */
110 int32x4_t sfooq_laneq (int32x4_t r, int8x16_t x, uint8x16_t y)
111 {
112 return vsudotq_laneq_s32 (r, x, y, 3);
113 }
114
115 /*
116 **ufoo_untied:
117 ** (
118 ** mov v0\.8b, v1\.8b
119 ** usdot v0\.2s, v2\.8b, v3\.8b
120 ** |
121 ** usdot v1\.2s, v2\.8b, v3\.8b
122 ** mov v0\.8b, v1\.8b
123 ** )
124 ** ret
125 */
126 int32x2_t ufoo_untied (int32x2_t unused, int32x2_t r, uint8x8_t x, int8x8_t y)
127 {
128 return vusdot_s32 (r, x, y);
129 }
130
131 /*
132 **ufooq_laneq_untied:
133 ** (
134 ** mov v0\.16b, v1\.16b
135 ** usdot v0\.4s, v2\.16b, v3\.4b\[3\]
136 ** |
137 ** usdot v1\.4s, v2\.16b, v3\.4b\[3\]
138 ** mov v0\.16b, v1\.16b
139 ** )
140 ** ret
141 */
142 int32x4_t ufooq_laneq_untied (int32x2_t unused, int32x4_t r, uint8x16_t x, int8x16_t y)
143 {
144 return vusdotq_laneq_s32 (r, x, y, 3);
145 }
146