blob: 91c48483f295cfd30b14ac9788388e7c6d49f894 [file] [log] [blame]
Ivan A. Kosarevff08ea72018-07-23 16:01:35 +00001// 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
Silviu Baranga3102a012016-04-29 15:03:32 +00004
5#include <arm_neon.h>
6
7float16x4_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
11float32x4_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}
Ivan A. Kosarev26037532018-07-23 14:53:44 +000014
15float16x4_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
19float16x8_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
23float16x4_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
27float16x8_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
31float16x4_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
35float16x8_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
39float16x4_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
43float16x8_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
47float16x4_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
51float16x8_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
55float16x4_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
59float16x8_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
63float16x4_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
67float16x8_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}
Ivan A. Kosarevff08ea72018-07-23 16:01:35 +000070
71float16x4_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
75float16x8_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
79float16x4_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
83float16x8_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}
Ivan A. Kosarev1b785122018-08-19 16:30:57 +000086
87float16x4_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
91float16x8_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
95float16x4_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
99float16x8_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
103float16x4_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
107float16x8_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
111float16x4x2_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
115float16x8x2_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
119float16x4x3_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
123float16x8x3_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
127float16x4x4_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
131float16x8x4_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
135float16x4x2_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
139float16x8x2_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
143float16x4x2_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
147float16x8x2_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
151float16x4x2_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
155float16x8x2_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
159float16x4x3_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
163float16x8x3_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
167float16x4x3_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
171float16x8x3_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
175float16x4x3_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
179float16x8x3_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
183float16x4x4_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
187float16x8x4_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
191float16x4x4_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
195float16x8x4_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
199float16x4x4_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
203float16x8x4_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
207void 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) {
212void 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) {
217void 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
221void 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
225void 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
229void 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
233void 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
237void 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
241void 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
245void 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
249void test_vst2_f16(float16_t *a, float16x4x2_t b) {
250 vst2_f16(a, b); // expected-warning{{implicit declaration of function 'vst2_f16'}}
251}
252
253void test_vst2q_f16(float16_t *a, float16x8x2_t b) {
254 vst2q_f16(a, b); // expected-warning{{implicit declaration of function 'vst2q_f16'}}
255}
256
257void 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
261void 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
265void test_vst3_f16(float16_t *a, float16x4x3_t b) {
266 vst3_f16(a, b); // expected-warning{{implicit declaration of function 'vst3_f16'}}
267}
268
269void test_vst3q_f16(float16_t *a, float16x8x3_t b) {
270 vst3q_f16(a, b); // expected-warning{{implicit declaration of function 'vst3q_f16'}}
271}
272
273void 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
277void 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
281void test_vst4_f16(float16_t *a, float16x4x4_t b) {
282 vst4_f16(a, b); // expected-warning{{implicit declaration of function 'vst4_f16'}}
283}
284
285void test_vst4q_f16(float16_t *a, float16x8x4_t b) {
286 vst4q_f16(a, b); // expected-warning{{implicit declaration of function 'vst4q_f16'}}
287}
288
289void 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
293void 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}