1 // RUN: %clang_cc1 -triple thumbv7-none-eabi %s -target-feature +neon \
2 // RUN: -fallow-half-arguments-and-returns -target-feature -fp16 \
3 // RUN: -fsyntax-only -verify
4
5 #include <arm_neon.h>
6
test_vcvt_f16_f32(float32x4_t a)7 float16x4_t test_vcvt_f16_f32(float32x4_t a) {
8 return vcvt_f16_f32(a); // expected-warning{{implicit declaration of function 'vcvt_f16_f32'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
9 }
10
test_vcvt_f32_f16(float16x4_t a)11 float32x4_t test_vcvt_f32_f16(float16x4_t a) {
12 return vcvt_f32_f16(a); // expected-warning{{implicit declaration of function 'vcvt_f32_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float32x4_t'}}
13 }
14
test_vrnda_f16(float16x4_t a)15 float16x4_t test_vrnda_f16(float16x4_t a) {
16 return vrnda_f16(a); // expected-warning{{implicit declaration of function 'vrnda_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
17 }
18
test_vrndaq_f16(float16x8_t a)19 float16x8_t test_vrndaq_f16(float16x8_t a) {
20 return vrndaq_f16(a); // expected-warning{{implicit declaration of function 'vrndaq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
21 }
22
test_vrnd_f16(float16x4_t a)23 float16x4_t test_vrnd_f16(float16x4_t a) {
24 return vrnd_f16(a); // expected-warning{{implicit declaration of function 'vrnd_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
25 }
26
test_vrndq_f16(float16x8_t a)27 float16x8_t test_vrndq_f16(float16x8_t a) {
28 return vrndq_f16(a); // expected-warning{{implicit declaration of function 'vrndq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
29 }
30
test_vrndi_f16(float16x4_t a)31 float16x4_t test_vrndi_f16(float16x4_t a) {
32 return vrndi_f16(a); // expected-warning{{implicit declaration of function 'vrndi_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
33 }
34
test_vrndiq_f16(float16x8_t a)35 float16x8_t test_vrndiq_f16(float16x8_t a) {
36 return vrndiq_f16(a); // expected-warning{{implicit declaration of function 'vrndiq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
37 }
38
test_vrndm_f16(float16x4_t a)39 float16x4_t test_vrndm_f16(float16x4_t a) {
40 return vrndm_f16(a); // expected-warning{{implicit declaration of function 'vrndm_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
41 }
42
test_vrndmq_f16(float16x8_t a)43 float16x8_t test_vrndmq_f16(float16x8_t a) {
44 return vrndmq_f16(a); // expected-warning{{implicit declaration of function 'vrndmq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
45 }
46
test_vrndn_f16(float16x4_t a)47 float16x4_t test_vrndn_f16(float16x4_t a) {
48 return vrndn_f16(a); // expected-warning{{implicit declaration of function 'vrndn_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
49 }
50
test_vrndnq_f16(float16x8_t a)51 float16x8_t test_vrndnq_f16(float16x8_t a) {
52 return vrndnq_f16(a); // expected-warning{{implicit declaration of function 'vrndnq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
53 }
54
test_vrndp_f16(float16x4_t a)55 float16x4_t test_vrndp_f16(float16x4_t a) {
56 return vrndp_f16(a); // expected-warning{{implicit declaration of function 'vrndp_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
57 }
58
test_vrndpq_f16(float16x8_t a)59 float16x8_t test_vrndpq_f16(float16x8_t a) {
60 return vrndpq_f16(a); // expected-warning{{implicit declaration of function 'vrndpq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
61 }
62
test_vrndx_f16(float16x4_t a)63 float16x4_t test_vrndx_f16(float16x4_t a) {
64 return vrndx_f16(a); // expected-warning{{implicit declaration of function 'vrndx_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
65 }
66
test_vrndxq_f16(float16x8_t a)67 float16x8_t test_vrndxq_f16(float16x8_t a) {
68 return vrndxq_f16(a); // expected-warning{{implicit declaration of function 'vrndxq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
69 }
70
test_vmaxnm_f16(float16x4_t a,float16x4_t b)71 float16x4_t test_vmaxnm_f16(float16x4_t a, float16x4_t b) {
72 return vmaxnm_f16(a, b); // expected-warning{{implicit declaration of function 'vmaxnm_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
73 }
74
test_vmaxnmq_f16(float16x8_t a,float16x8_t b)75 float16x8_t test_vmaxnmq_f16(float16x8_t a, float16x8_t b) {
76 return vmaxnmq_f16(a, b); // expected-warning{{implicit declaration of function 'vmaxnmq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
77 }
78
test_vminnm_f16(float16x4_t a,float16x4_t b)79 float16x4_t test_vminnm_f16(float16x4_t a, float16x4_t b) {
80 return vminnm_f16(a, b); // expected-warning{{implicit declaration of function 'vminnm_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
81 }
82
test_vminnmq_f16(float16x8_t a,float16x8_t b)83 float16x8_t test_vminnmq_f16(float16x8_t a, float16x8_t b) {
84 return vminnmq_f16(a, b); // expected-warning{{implicit declaration of function 'vminnmq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
85 }
86
test_vld1_f16(const float16_t * a)87 float16x4_t test_vld1_f16(const float16_t *a) {
88 return vld1_f16(a); // expected-warning{{implicit declaration of function 'vld1_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
89 }
90
test_vld1q_f16(const float16_t * a)91 float16x8_t test_vld1q_f16(const float16_t *a) {
92 return vld1q_f16(a); // expected-warning{{implicit declaration of function 'vld1q_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
93 }
94
test_vld1_dup_f16(const float16_t * a)95 float16x4_t test_vld1_dup_f16(const float16_t *a) {
96 return vld1_dup_f16(a); // expected-warning{{implicit declaration of function 'vld1_dup_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
97 }
98
test_vld1q_dup_f16(const float16_t * a)99 float16x8_t test_vld1q_dup_f16(const float16_t *a) {
100 return vld1q_dup_f16(a); // expected-warning{{implicit declaration of function 'vld1q_dup_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
101 }
102
test_vld1_lane_f16(const float16_t * a,float16x4_t b)103 float16x4_t test_vld1_lane_f16(const float16_t *a, float16x4_t b) {
104 return vld1_lane_f16(a, b, 3); // expected-warning{{implicit declaration of function 'vld1_lane_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
105 }
106
test_vld1q_lane_f16(const float16_t * a,float16x8_t b)107 float16x8_t test_vld1q_lane_f16(const float16_t *a, float16x8_t b) {
108 return vld1q_lane_f16(a, b, 7); // expected-warning{{implicit declaration of function 'vld1q_lane_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
109 }
110
test_vld1_f16_x2(const float16_t * a)111 float16x4x2_t test_vld1_f16_x2(const float16_t *a) {
112 return vld1_f16_x2(a); // expected-warning{{implicit declaration of function 'vld1_f16_x2'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x2_t'}}
113 }
114
test_vld1q_f16_x2(const float16_t * a)115 float16x8x2_t test_vld1q_f16_x2(const float16_t *a) {
116 return vld1q_f16_x2(a); // expected-warning{{implicit declaration of function 'vld1q_f16_x2'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x2_t'}}
117 }
118
test_vld1_f16_x3(const float16_t * a)119 float16x4x3_t test_vld1_f16_x3(const float16_t *a) {
120 return vld1_f16_x3(a); // expected-warning{{implicit declaration of function 'vld1_f16_x3'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x3_t'}}
121 }
122
test_vld1q_f16_x3(const float16_t * a)123 float16x8x3_t test_vld1q_f16_x3(const float16_t *a) {
124 return vld1q_f16_x3(a); // expected-warning{{implicit declaration of function 'vld1q_f16_x3'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x3_t'}}
125 }
126
test_vld1_f16_x4(const float16_t * a)127 float16x4x4_t test_vld1_f16_x4(const float16_t *a) {
128 return vld1_f16_x4(a); // expected-warning{{implicit declaration of function 'vld1_f16_x4'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x4_t'}}
129 }
130
test_vld1q_f16_x4(const float16_t * a)131 float16x8x4_t test_vld1q_f16_x4(const float16_t *a) {
132 return vld1q_f16_x4(a); // expected-warning{{implicit declaration of function 'vld1q_f16_x4'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x4_t'}}
133 }
134
test_vld2_f16(const float16_t * a)135 float16x4x2_t test_vld2_f16(const float16_t *a) {
136 return vld2_f16(a); // expected-warning{{implicit declaration of function 'vld2_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x2_t'}}
137 }
138
test_vld2q_f16(const float16_t * a)139 float16x8x2_t test_vld2q_f16(const float16_t *a) {
140 return vld2q_f16(a); // expected-warning{{implicit declaration of function 'vld2q_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x2_t'}}
141 }
142
test_vld2_lane_f16(const float16_t * a,float16x4x2_t b)143 float16x4x2_t test_vld2_lane_f16(const float16_t *a, float16x4x2_t b) {
144 return vld2_lane_f16(a, b, 3); // expected-warning{{implicit declaration of function 'vld2_lane_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x2_t'}}
145 }
146
test_vld2q_lane_f16(const float16_t * a,float16x8x2_t b)147 float16x8x2_t test_vld2q_lane_f16(const float16_t *a, float16x8x2_t b) {
148 return vld2q_lane_f16(a, b, 7); // expected-warning{{implicit declaration of function 'vld2q_lane_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x2_t'}}
149 }
150
test_vld2_dup_f16(const float16_t * src)151 float16x4x2_t test_vld2_dup_f16(const float16_t *src) {
152 return vld2_dup_f16(src); // expected-warning{{implicit declaration of function 'vld2_dup_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x2_t'}}
153 }
154
test_vld2q_dup_f16(const float16_t * src)155 float16x8x2_t test_vld2q_dup_f16(const float16_t *src) {
156 return vld2q_dup_f16(src); // expected-warning{{implicit declaration of function 'vld2q_dup_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x2_t'}}
157 }
158
test_vld3_f16(const float16_t * a)159 float16x4x3_t test_vld3_f16(const float16_t *a) {
160 return vld3_f16(a); // expected-warning{{implicit declaration of function 'vld3_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x3_t'}}
161 }
162
test_vld3q_f16(const float16_t * a)163 float16x8x3_t test_vld3q_f16(const float16_t *a) {
164 return vld3q_f16(a); // expected-warning{{implicit declaration of function 'vld3q_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x3_t'}}
165 }
166
test_vld3_lane_f16(const float16_t * a,float16x4x3_t b)167 float16x4x3_t test_vld3_lane_f16(const float16_t *a, float16x4x3_t b) {
168 return vld3_lane_f16(a, b, 3); // expected-warning{{implicit declaration of function 'vld3_lane_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x3_t'}}
169 }
170
test_vld3q_lane_f16(const float16_t * a,float16x8x3_t b)171 float16x8x3_t test_vld3q_lane_f16(const float16_t *a, float16x8x3_t b) {
172 return vld3q_lane_f16(a, b, 7); // expected-warning{{implicit declaration of function 'vld3q_lane_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x3_t'}}
173 }
174
test_vld3_dup_f16(const float16_t * src)175 float16x4x3_t test_vld3_dup_f16(const float16_t *src) {
176 return vld3_dup_f16(src); // expected-warning{{implicit declaration of function 'vld3_dup_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x3_t'}}
177 }
178
test_vld3q_dup_f16(const float16_t * src)179 float16x8x3_t test_vld3q_dup_f16(const float16_t *src) {
180 return vld3q_dup_f16(src); // expected-warning{{implicit declaration of function 'vld3q_dup_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x3_t'}}
181 }
182
test_vld4_f16(const float16_t * a)183 float16x4x4_t test_vld4_f16(const float16_t *a) {
184 return vld4_f16(a); // expected-warning{{implicit declaration of function 'vld4_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x4_t'}}
185 }
186
test_vld4q_f16(const float16_t * a)187 float16x8x4_t test_vld4q_f16(const float16_t *a) {
188 return vld4q_f16(a); // expected-warning{{implicit declaration of function 'vld4q_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x4_t'}}
189 }
190
test_vld4_lane_f16(const float16_t * a,float16x4x4_t b)191 float16x4x4_t test_vld4_lane_f16(const float16_t *a, float16x4x4_t b) {
192 return vld4_lane_f16(a, b, 3); // expected-warning{{implicit declaration of function 'vld4_lane_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x4_t'}}
193 }
194
test_vld4q_lane_f16(const float16_t * a,float16x8x4_t b)195 float16x8x4_t test_vld4q_lane_f16(const float16_t *a, float16x8x4_t b) {
196 return vld4q_lane_f16(a, b, 7); // expected-warning{{implicit declaration of function 'vld4q_lane_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x4_t'}}
197 }
198
test_vld4_dup_f16(const float16_t * src)199 float16x4x4_t test_vld4_dup_f16(const float16_t *src) {
200 return vld4_dup_f16(src); // expected-warning{{implicit declaration of function 'vld4_dup_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4x4_t'}}
201 }
202
test_vld4q_dup_f16(const float16_t * src)203 float16x8x4_t test_vld4q_dup_f16(const float16_t *src) {
204 return vld4q_dup_f16(src); // expected-warning{{implicit declaration of function 'vld4q_dup_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8x4_t'}}
205 }
206
test_vst1_f16(float16_t * a,float16x4_t b)207 void test_vst1_f16(float16_t *a, float16x4_t b) {
208 vst1_f16(a, b); // expected-warning{{implicit declaration of function 'vst1_f16'}}
209 }
210
211 // aarch64-neon-intrinsics.c:void test_vst1q_f16(float16_t *a, float16x8_t b) {
test_vst1q_f16(float16_t * a,float16x8_t b)212 void test_vst1q_f16(float16_t *a, float16x8_t b) {
213 vst1q_f16(a, b); // expected-warning{{implicit declaration of function 'vst1q_f16'}}
214 }
215
216 // aarch64-neon-ldst-one.c:void test_vst1_lane_f16(float16_t *a, float16x4_t b) {
test_vst1_lane_f16(float16_t * a,float16x4_t b)217 void test_vst1_lane_f16(float16_t *a, float16x4_t b) {
218 vst1_lane_f16(a, b, 3); // expected-warning{{implicit declaration of function 'vst1_lane_f16'}}
219 }
220
test_vst1q_lane_f16(float16_t * a,float16x8_t b)221 void test_vst1q_lane_f16(float16_t *a, float16x8_t b) {
222 vst1q_lane_f16(a, b, 7); // expected-warning{{implicit declaration of function 'vst1q_lane_f16'}}
223 }
224
test_vst1_f16_x2(float16_t * a,float16x4x2_t b)225 void test_vst1_f16_x2(float16_t *a, float16x4x2_t b) {
226 vst1_f16_x2(a, b); // expected-warning{{implicit declaration of function 'vst1_f16_x2'}}
227 }
228
test_vst1q_f16_x2(float16_t * a,float16x8x2_t b)229 void test_vst1q_f16_x2(float16_t *a, float16x8x2_t b) {
230 vst1q_f16_x2(a, b); // expected-warning{{implicit declaration of function 'vst1q_f16_x2'}}
231 }
232
test_vst1_f16_x3(float16_t * a,float16x4x3_t b)233 void test_vst1_f16_x3(float16_t *a, float16x4x3_t b) {
234 vst1_f16_x3(a, b); // expected-warning{{implicit declaration of function 'vst1_f16_x3'}}
235 }
236
test_vst1q_f16_x3(float16_t * a,float16x8x3_t b)237 void test_vst1q_f16_x3(float16_t *a, float16x8x3_t b) {
238 vst1q_f16_x3(a, b); // expected-warning{{implicit declaration of function 'vst1q_f16_x3'}}
239 }
240
test_vst1_f16_x4(float16_t * a,float16x4x4_t b)241 void test_vst1_f16_x4(float16_t *a, float16x4x4_t b) {
242 vst1_f16_x4(a, b); // expected-warning{{implicit declaration of function 'vst1_f16_x4'}}
243 }
244
test_vst1q_f16_x4(float16_t * a,float16x8x4_t b)245 void test_vst1q_f16_x4(float16_t *a, float16x8x4_t b) {
246 vst1q_f16_x4(a, b); // expected-warning{{implicit declaration of function 'vst1q_f16_x4'}}
247 }
248
test_vst2_f16(float16_t * a,float16x4x2_t b)249 void test_vst2_f16(float16_t *a, float16x4x2_t b) {
250 vst2_f16(a, b); // expected-warning{{implicit declaration of function 'vst2_f16'}}
251 }
252
test_vst2q_f16(float16_t * a,float16x8x2_t b)253 void test_vst2q_f16(float16_t *a, float16x8x2_t b) {
254 vst2q_f16(a, b); // expected-warning{{implicit declaration of function 'vst2q_f16'}}
255 }
256
test_vst2_lane_f16(float16_t * a,float16x4x2_t b)257 void test_vst2_lane_f16(float16_t *a, float16x4x2_t b) {
258 vst2_lane_f16(a, b, 3); // expected-warning{{implicit declaration of function 'vst2_lane_f16'}}
259 }
260
test_vst2q_lane_f16(float16_t * a,float16x8x2_t b)261 void test_vst2q_lane_f16(float16_t *a, float16x8x2_t b) {
262 vst2q_lane_f16(a, b, 7); // expected-warning{{implicit declaration of function 'vst2q_lane_f16'}}
263 }
264
test_vst3_f16(float16_t * a,float16x4x3_t b)265 void test_vst3_f16(float16_t *a, float16x4x3_t b) {
266 vst3_f16(a, b); // expected-warning{{implicit declaration of function 'vst3_f16'}}
267 }
268
test_vst3q_f16(float16_t * a,float16x8x3_t b)269 void test_vst3q_f16(float16_t *a, float16x8x3_t b) {
270 vst3q_f16(a, b); // expected-warning{{implicit declaration of function 'vst3q_f16'}}
271 }
272
test_vst3_lane_f16(float16_t * a,float16x4x3_t b)273 void test_vst3_lane_f16(float16_t *a, float16x4x3_t b) {
274 vst3_lane_f16(a, b, 3); // expected-warning{{implicit declaration of function 'vst3_lane_f16'}}
275 }
276
test_vst3q_lane_f16(float16_t * a,float16x8x3_t b)277 void test_vst3q_lane_f16(float16_t *a, float16x8x3_t b) {
278 vst3q_lane_f16(a, b, 7); // expected-warning{{implicit declaration of function 'vst3q_lane_f16'}}
279 }
280
test_vst4_f16(float16_t * a,float16x4x4_t b)281 void test_vst4_f16(float16_t *a, float16x4x4_t b) {
282 vst4_f16(a, b); // expected-warning{{implicit declaration of function 'vst4_f16'}}
283 }
284
test_vst4q_f16(float16_t * a,float16x8x4_t b)285 void test_vst4q_f16(float16_t *a, float16x8x4_t b) {
286 vst4q_f16(a, b); // expected-warning{{implicit declaration of function 'vst4q_f16'}}
287 }
288
test_vst4_lane_f16(float16_t * a,float16x4x4_t b)289 void test_vst4_lane_f16(float16_t *a, float16x4x4_t b) {
290 vst4_lane_f16(a, b, 3); // expected-warning{{implicit declaration of function 'vst4_lane_f16'}}
291 }
292
test_vst4q_lane_f16(float16_t * a,float16x8x4_t b)293 void test_vst4q_lane_f16(float16_t *a, float16x8x4_t b) {
294 vst4q_lane_f16(a, b, 7); // expected-warning{{implicit declaration of function 'vst4q_lane_f16'}}
295 }
296