1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=aarch64-none-eabi -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD,CHECK-SD-NOFP16
3 ; RUN: llc -mtriple=aarch64-none-eabi -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD,CHECK-SD-FP16
4 ; RUN: llc -mtriple=aarch64-none-eabi -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI,CHECK-GI-NOFP16
5 ; RUN: llc -mtriple=aarch64-none-eabi -mattr=+fullfp16 -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI,CHECK-GI-FP16
7 define double @fdiv_f64(double %a, double %b) {
8 ; CHECK-LABEL: fdiv_f64:
9 ; CHECK: // %bb.0: // %entry
10 ; CHECK-NEXT: fdiv d0, d0, d1
13 %c = fdiv double %a, %b
17 define float @fdiv_f32(float %a, float %b) {
18 ; CHECK-LABEL: fdiv_f32:
19 ; CHECK: // %bb.0: // %entry
20 ; CHECK-NEXT: fdiv s0, s0, s1
23 %c = fdiv float %a, %b
27 define half @fdiv_f16(half %a, half %b) {
28 ; CHECK-SD-NOFP16-LABEL: fdiv_f16:
29 ; CHECK-SD-NOFP16: // %bb.0: // %entry
30 ; CHECK-SD-NOFP16-NEXT: fcvt s1, h1
31 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h0
32 ; CHECK-SD-NOFP16-NEXT: fdiv s0, s0, s1
33 ; CHECK-SD-NOFP16-NEXT: fcvt h0, s0
34 ; CHECK-SD-NOFP16-NEXT: ret
36 ; CHECK-SD-FP16-LABEL: fdiv_f16:
37 ; CHECK-SD-FP16: // %bb.0: // %entry
38 ; CHECK-SD-FP16-NEXT: fdiv h0, h0, h1
39 ; CHECK-SD-FP16-NEXT: ret
41 ; CHECK-GI-NOFP16-LABEL: fdiv_f16:
42 ; CHECK-GI-NOFP16: // %bb.0: // %entry
43 ; CHECK-GI-NOFP16-NEXT: fcvt s0, h0
44 ; CHECK-GI-NOFP16-NEXT: fcvt s1, h1
45 ; CHECK-GI-NOFP16-NEXT: fdiv s0, s0, s1
46 ; CHECK-GI-NOFP16-NEXT: fcvt h0, s0
47 ; CHECK-GI-NOFP16-NEXT: ret
49 ; CHECK-GI-FP16-LABEL: fdiv_f16:
50 ; CHECK-GI-FP16: // %bb.0: // %entry
51 ; CHECK-GI-FP16-NEXT: fdiv h0, h0, h1
52 ; CHECK-GI-FP16-NEXT: ret
58 define <2 x double> @fdiv_v2f64(<2 x double> %a, <2 x double> %b) {
59 ; CHECK-LABEL: fdiv_v2f64:
60 ; CHECK: // %bb.0: // %entry
61 ; CHECK-NEXT: fdiv v0.2d, v0.2d, v1.2d
64 %c = fdiv <2 x double> %a, %b
68 define <3 x double> @fdiv_v3f64(<3 x double> %a, <3 x double> %b) {
69 ; CHECK-SD-LABEL: fdiv_v3f64:
70 ; CHECK-SD: // %bb.0: // %entry
71 ; CHECK-SD-NEXT: // kill: def $d3 killed $d3 def $q3
72 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
73 ; CHECK-SD-NEXT: // kill: def $d4 killed $d4 def $q4
74 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 def $q1
75 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 def $q2
76 ; CHECK-SD-NEXT: // kill: def $d5 killed $d5 def $q5
77 ; CHECK-SD-NEXT: mov v3.d[1], v4.d[0]
78 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
79 ; CHECK-SD-NEXT: fdiv v2.2d, v2.2d, v5.2d
80 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
81 ; CHECK-SD-NEXT: fdiv v0.2d, v0.2d, v3.2d
82 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
83 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
84 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
87 ; CHECK-GI-LABEL: fdiv_v3f64:
88 ; CHECK-GI: // %bb.0: // %entry
89 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
90 ; CHECK-GI-NEXT: // kill: def $d3 killed $d3 def $q3
91 ; CHECK-GI-NEXT: // kill: def $d1 killed $d1 def $q1
92 ; CHECK-GI-NEXT: // kill: def $d4 killed $d4 def $q4
93 ; CHECK-GI-NEXT: fdiv d2, d2, d5
94 ; CHECK-GI-NEXT: mov v0.d[1], v1.d[0]
95 ; CHECK-GI-NEXT: mov v3.d[1], v4.d[0]
96 ; CHECK-GI-NEXT: fdiv v0.2d, v0.2d, v3.2d
97 ; CHECK-GI-NEXT: mov d1, v0.d[1]
98 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
101 %c = fdiv <3 x double> %a, %b
105 define <4 x double> @fdiv_v4f64(<4 x double> %a, <4 x double> %b) {
106 ; CHECK-SD-LABEL: fdiv_v4f64:
107 ; CHECK-SD: // %bb.0: // %entry
108 ; CHECK-SD-NEXT: fdiv v1.2d, v1.2d, v3.2d
109 ; CHECK-SD-NEXT: fdiv v0.2d, v0.2d, v2.2d
112 ; CHECK-GI-LABEL: fdiv_v4f64:
113 ; CHECK-GI: // %bb.0: // %entry
114 ; CHECK-GI-NEXT: fdiv v0.2d, v0.2d, v2.2d
115 ; CHECK-GI-NEXT: fdiv v1.2d, v1.2d, v3.2d
118 %c = fdiv <4 x double> %a, %b
122 define <2 x float> @fdiv_v2f32(<2 x float> %a, <2 x float> %b) {
123 ; CHECK-LABEL: fdiv_v2f32:
124 ; CHECK: // %bb.0: // %entry
125 ; CHECK-NEXT: fdiv v0.2s, v0.2s, v1.2s
128 %c = fdiv <2 x float> %a, %b
132 define <3 x float> @fdiv_v3f32(<3 x float> %a, <3 x float> %b) {
133 ; CHECK-LABEL: fdiv_v3f32:
134 ; CHECK: // %bb.0: // %entry
135 ; CHECK-NEXT: fdiv v0.4s, v0.4s, v1.4s
138 %c = fdiv <3 x float> %a, %b
142 define <4 x float> @fdiv_v4f32(<4 x float> %a, <4 x float> %b) {
143 ; CHECK-LABEL: fdiv_v4f32:
144 ; CHECK: // %bb.0: // %entry
145 ; CHECK-NEXT: fdiv v0.4s, v0.4s, v1.4s
148 %c = fdiv <4 x float> %a, %b
152 define <8 x float> @fdiv_v8f32(<8 x float> %a, <8 x float> %b) {
153 ; CHECK-SD-LABEL: fdiv_v8f32:
154 ; CHECK-SD: // %bb.0: // %entry
155 ; CHECK-SD-NEXT: fdiv v1.4s, v1.4s, v3.4s
156 ; CHECK-SD-NEXT: fdiv v0.4s, v0.4s, v2.4s
159 ; CHECK-GI-LABEL: fdiv_v8f32:
160 ; CHECK-GI: // %bb.0: // %entry
161 ; CHECK-GI-NEXT: fdiv v0.4s, v0.4s, v2.4s
162 ; CHECK-GI-NEXT: fdiv v1.4s, v1.4s, v3.4s
165 %c = fdiv <8 x float> %a, %b
169 define <7 x half> @fdiv_v7f16(<7 x half> %a, <7 x half> %b) {
170 ; CHECK-SD-NOFP16-LABEL: fdiv_v7f16:
171 ; CHECK-SD-NOFP16: // %bb.0: // %entry
172 ; CHECK-SD-NOFP16-NEXT: mov h2, v1.h[1]
173 ; CHECK-SD-NOFP16-NEXT: mov h3, v0.h[1]
174 ; CHECK-SD-NOFP16-NEXT: fcvt s4, h0
175 ; CHECK-SD-NOFP16-NEXT: mov h5, v0.h[2]
176 ; CHECK-SD-NOFP16-NEXT: mov h6, v0.h[3]
177 ; CHECK-SD-NOFP16-NEXT: mov h7, v0.h[4]
178 ; CHECK-SD-NOFP16-NEXT: mov h16, v0.h[5]
179 ; CHECK-SD-NOFP16-NEXT: mov h17, v0.h[6]
180 ; CHECK-SD-NOFP16-NEXT: mov h0, v0.h[7]
181 ; CHECK-SD-NOFP16-NEXT: fcvt s2, h2
182 ; CHECK-SD-NOFP16-NEXT: fcvt s3, h3
183 ; CHECK-SD-NOFP16-NEXT: fcvt s5, h5
184 ; CHECK-SD-NOFP16-NEXT: fcvt s6, h6
185 ; CHECK-SD-NOFP16-NEXT: fcvt s7, h7
186 ; CHECK-SD-NOFP16-NEXT: fcvt s16, h16
187 ; CHECK-SD-NOFP16-NEXT: fcvt s17, h17
188 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h0
189 ; CHECK-SD-NOFP16-NEXT: fdiv s2, s3, s2
190 ; CHECK-SD-NOFP16-NEXT: fcvt s3, h1
191 ; CHECK-SD-NOFP16-NEXT: fdiv s3, s4, s3
192 ; CHECK-SD-NOFP16-NEXT: mov h4, v1.h[2]
193 ; CHECK-SD-NOFP16-NEXT: fcvt h18, s2
194 ; CHECK-SD-NOFP16-NEXT: fcvt s4, h4
195 ; CHECK-SD-NOFP16-NEXT: fdiv s4, s5, s4
196 ; CHECK-SD-NOFP16-NEXT: mov h5, v1.h[3]
197 ; CHECK-SD-NOFP16-NEXT: fcvt h2, s3
198 ; CHECK-SD-NOFP16-NEXT: fcvt s5, h5
199 ; CHECK-SD-NOFP16-NEXT: mov v2.h[1], v18.h[0]
200 ; CHECK-SD-NOFP16-NEXT: fdiv s5, s6, s5
201 ; CHECK-SD-NOFP16-NEXT: mov h6, v1.h[4]
202 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s4
203 ; CHECK-SD-NOFP16-NEXT: fcvt s6, h6
204 ; CHECK-SD-NOFP16-NEXT: mov v2.h[2], v4.h[0]
205 ; CHECK-SD-NOFP16-NEXT: fdiv s6, s7, s6
206 ; CHECK-SD-NOFP16-NEXT: mov h7, v1.h[5]
207 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s5
208 ; CHECK-SD-NOFP16-NEXT: fcvt s7, h7
209 ; CHECK-SD-NOFP16-NEXT: mov v2.h[3], v4.h[0]
210 ; CHECK-SD-NOFP16-NEXT: fdiv s7, s16, s7
211 ; CHECK-SD-NOFP16-NEXT: mov h16, v1.h[6]
212 ; CHECK-SD-NOFP16-NEXT: mov h1, v1.h[7]
213 ; CHECK-SD-NOFP16-NEXT: fcvt s16, h16
214 ; CHECK-SD-NOFP16-NEXT: fcvt s1, h1
215 ; CHECK-SD-NOFP16-NEXT: fdiv s3, s17, s16
216 ; CHECK-SD-NOFP16-NEXT: fdiv s0, s0, s1
217 ; CHECK-SD-NOFP16-NEXT: fcvt h1, s6
218 ; CHECK-SD-NOFP16-NEXT: mov v2.h[4], v1.h[0]
219 ; CHECK-SD-NOFP16-NEXT: fcvt h1, s7
220 ; CHECK-SD-NOFP16-NEXT: mov v2.h[5], v1.h[0]
221 ; CHECK-SD-NOFP16-NEXT: fcvt h1, s3
222 ; CHECK-SD-NOFP16-NEXT: mov v2.h[6], v1.h[0]
223 ; CHECK-SD-NOFP16-NEXT: fcvt h0, s0
224 ; CHECK-SD-NOFP16-NEXT: mov v2.h[7], v0.h[0]
225 ; CHECK-SD-NOFP16-NEXT: mov v0.16b, v2.16b
226 ; CHECK-SD-NOFP16-NEXT: ret
228 ; CHECK-SD-FP16-LABEL: fdiv_v7f16:
229 ; CHECK-SD-FP16: // %bb.0: // %entry
230 ; CHECK-SD-FP16-NEXT: fdiv v0.8h, v0.8h, v1.8h
231 ; CHECK-SD-FP16-NEXT: ret
233 ; CHECK-GI-NOFP16-LABEL: fdiv_v7f16:
234 ; CHECK-GI-NOFP16: // %bb.0: // %entry
235 ; CHECK-GI-NOFP16-NEXT: mov h2, v0.h[4]
236 ; CHECK-GI-NOFP16-NEXT: mov h3, v0.h[5]
237 ; CHECK-GI-NOFP16-NEXT: mov h4, v1.h[4]
238 ; CHECK-GI-NOFP16-NEXT: mov h5, v1.h[5]
239 ; CHECK-GI-NOFP16-NEXT: fcvtl v6.4s, v0.4h
240 ; CHECK-GI-NOFP16-NEXT: fcvtl v7.4s, v1.4h
241 ; CHECK-GI-NOFP16-NEXT: mov h0, v0.h[6]
242 ; CHECK-GI-NOFP16-NEXT: mov h1, v1.h[6]
243 ; CHECK-GI-NOFP16-NEXT: mov v2.h[1], v3.h[0]
244 ; CHECK-GI-NOFP16-NEXT: mov v4.h[1], v5.h[0]
245 ; CHECK-GI-NOFP16-NEXT: fdiv v3.4s, v6.4s, v7.4s
246 ; CHECK-GI-NOFP16-NEXT: mov v2.h[2], v0.h[0]
247 ; CHECK-GI-NOFP16-NEXT: mov v4.h[2], v1.h[0]
248 ; CHECK-GI-NOFP16-NEXT: mov v2.h[3], v0.h[0]
249 ; CHECK-GI-NOFP16-NEXT: mov v4.h[3], v0.h[0]
250 ; CHECK-GI-NOFP16-NEXT: fcvtl v1.4s, v2.4h
251 ; CHECK-GI-NOFP16-NEXT: fcvtl v2.4s, v4.4h
252 ; CHECK-GI-NOFP16-NEXT: fcvtn v0.4h, v3.4s
253 ; CHECK-GI-NOFP16-NEXT: fdiv v1.4s, v1.4s, v2.4s
254 ; CHECK-GI-NOFP16-NEXT: mov h2, v0.h[1]
255 ; CHECK-GI-NOFP16-NEXT: mov h3, v0.h[2]
256 ; CHECK-GI-NOFP16-NEXT: mov h4, v0.h[3]
257 ; CHECK-GI-NOFP16-NEXT: mov v0.h[1], v2.h[0]
258 ; CHECK-GI-NOFP16-NEXT: mov v0.h[2], v3.h[0]
259 ; CHECK-GI-NOFP16-NEXT: fcvtn v1.4h, v1.4s
260 ; CHECK-GI-NOFP16-NEXT: mov v0.h[3], v4.h[0]
261 ; CHECK-GI-NOFP16-NEXT: mov h2, v1.h[1]
262 ; CHECK-GI-NOFP16-NEXT: mov v0.h[4], v1.h[0]
263 ; CHECK-GI-NOFP16-NEXT: mov h1, v1.h[2]
264 ; CHECK-GI-NOFP16-NEXT: mov v0.h[5], v2.h[0]
265 ; CHECK-GI-NOFP16-NEXT: mov v0.h[6], v1.h[0]
266 ; CHECK-GI-NOFP16-NEXT: mov v0.h[7], v0.h[0]
267 ; CHECK-GI-NOFP16-NEXT: ret
269 ; CHECK-GI-FP16-LABEL: fdiv_v7f16:
270 ; CHECK-GI-FP16: // %bb.0: // %entry
271 ; CHECK-GI-FP16-NEXT: fdiv v0.8h, v0.8h, v1.8h
272 ; CHECK-GI-FP16-NEXT: ret
274 %c = fdiv <7 x half> %a, %b
278 define <4 x half> @fdiv_v4f16(<4 x half> %a, <4 x half> %b) {
279 ; CHECK-SD-NOFP16-LABEL: fdiv_v4f16:
280 ; CHECK-SD-NOFP16: // %bb.0: // %entry
281 ; CHECK-SD-NOFP16-NEXT: fcvtl v1.4s, v1.4h
282 ; CHECK-SD-NOFP16-NEXT: fcvtl v0.4s, v0.4h
283 ; CHECK-SD-NOFP16-NEXT: fdiv v0.4s, v0.4s, v1.4s
284 ; CHECK-SD-NOFP16-NEXT: fcvtn v0.4h, v0.4s
285 ; CHECK-SD-NOFP16-NEXT: ret
287 ; CHECK-SD-FP16-LABEL: fdiv_v4f16:
288 ; CHECK-SD-FP16: // %bb.0: // %entry
289 ; CHECK-SD-FP16-NEXT: fdiv v0.4h, v0.4h, v1.4h
290 ; CHECK-SD-FP16-NEXT: ret
292 ; CHECK-GI-NOFP16-LABEL: fdiv_v4f16:
293 ; CHECK-GI-NOFP16: // %bb.0: // %entry
294 ; CHECK-GI-NOFP16-NEXT: fcvtl v0.4s, v0.4h
295 ; CHECK-GI-NOFP16-NEXT: fcvtl v1.4s, v1.4h
296 ; CHECK-GI-NOFP16-NEXT: fdiv v0.4s, v0.4s, v1.4s
297 ; CHECK-GI-NOFP16-NEXT: fcvtn v0.4h, v0.4s
298 ; CHECK-GI-NOFP16-NEXT: ret
300 ; CHECK-GI-FP16-LABEL: fdiv_v4f16:
301 ; CHECK-GI-FP16: // %bb.0: // %entry
302 ; CHECK-GI-FP16-NEXT: fdiv v0.4h, v0.4h, v1.4h
303 ; CHECK-GI-FP16-NEXT: ret
305 %c = fdiv <4 x half> %a, %b
309 define <8 x half> @fdiv_v8f16(<8 x half> %a, <8 x half> %b) {
310 ; CHECK-SD-NOFP16-LABEL: fdiv_v8f16:
311 ; CHECK-SD-NOFP16: // %bb.0: // %entry
312 ; CHECK-SD-NOFP16-NEXT: mov h2, v1.h[1]
313 ; CHECK-SD-NOFP16-NEXT: mov h3, v0.h[1]
314 ; CHECK-SD-NOFP16-NEXT: fcvt s4, h0
315 ; CHECK-SD-NOFP16-NEXT: mov h5, v0.h[2]
316 ; CHECK-SD-NOFP16-NEXT: mov h6, v0.h[3]
317 ; CHECK-SD-NOFP16-NEXT: mov h7, v0.h[4]
318 ; CHECK-SD-NOFP16-NEXT: mov h16, v0.h[5]
319 ; CHECK-SD-NOFP16-NEXT: mov h17, v0.h[6]
320 ; CHECK-SD-NOFP16-NEXT: mov h0, v0.h[7]
321 ; CHECK-SD-NOFP16-NEXT: fcvt s2, h2
322 ; CHECK-SD-NOFP16-NEXT: fcvt s3, h3
323 ; CHECK-SD-NOFP16-NEXT: fcvt s5, h5
324 ; CHECK-SD-NOFP16-NEXT: fcvt s6, h6
325 ; CHECK-SD-NOFP16-NEXT: fcvt s7, h7
326 ; CHECK-SD-NOFP16-NEXT: fcvt s16, h16
327 ; CHECK-SD-NOFP16-NEXT: fcvt s17, h17
328 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h0
329 ; CHECK-SD-NOFP16-NEXT: fdiv s2, s3, s2
330 ; CHECK-SD-NOFP16-NEXT: fcvt s3, h1
331 ; CHECK-SD-NOFP16-NEXT: fdiv s3, s4, s3
332 ; CHECK-SD-NOFP16-NEXT: mov h4, v1.h[2]
333 ; CHECK-SD-NOFP16-NEXT: fcvt h18, s2
334 ; CHECK-SD-NOFP16-NEXT: fcvt s4, h4
335 ; CHECK-SD-NOFP16-NEXT: fdiv s4, s5, s4
336 ; CHECK-SD-NOFP16-NEXT: mov h5, v1.h[3]
337 ; CHECK-SD-NOFP16-NEXT: fcvt h2, s3
338 ; CHECK-SD-NOFP16-NEXT: fcvt s5, h5
339 ; CHECK-SD-NOFP16-NEXT: mov v2.h[1], v18.h[0]
340 ; CHECK-SD-NOFP16-NEXT: fdiv s5, s6, s5
341 ; CHECK-SD-NOFP16-NEXT: mov h6, v1.h[4]
342 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s4
343 ; CHECK-SD-NOFP16-NEXT: fcvt s6, h6
344 ; CHECK-SD-NOFP16-NEXT: mov v2.h[2], v4.h[0]
345 ; CHECK-SD-NOFP16-NEXT: fdiv s6, s7, s6
346 ; CHECK-SD-NOFP16-NEXT: mov h7, v1.h[5]
347 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s5
348 ; CHECK-SD-NOFP16-NEXT: fcvt s7, h7
349 ; CHECK-SD-NOFP16-NEXT: mov v2.h[3], v4.h[0]
350 ; CHECK-SD-NOFP16-NEXT: fdiv s7, s16, s7
351 ; CHECK-SD-NOFP16-NEXT: mov h16, v1.h[6]
352 ; CHECK-SD-NOFP16-NEXT: mov h1, v1.h[7]
353 ; CHECK-SD-NOFP16-NEXT: fcvt s16, h16
354 ; CHECK-SD-NOFP16-NEXT: fcvt s1, h1
355 ; CHECK-SD-NOFP16-NEXT: fdiv s3, s17, s16
356 ; CHECK-SD-NOFP16-NEXT: fdiv s0, s0, s1
357 ; CHECK-SD-NOFP16-NEXT: fcvt h1, s6
358 ; CHECK-SD-NOFP16-NEXT: mov v2.h[4], v1.h[0]
359 ; CHECK-SD-NOFP16-NEXT: fcvt h1, s7
360 ; CHECK-SD-NOFP16-NEXT: mov v2.h[5], v1.h[0]
361 ; CHECK-SD-NOFP16-NEXT: fcvt h1, s3
362 ; CHECK-SD-NOFP16-NEXT: mov v2.h[6], v1.h[0]
363 ; CHECK-SD-NOFP16-NEXT: fcvt h0, s0
364 ; CHECK-SD-NOFP16-NEXT: mov v2.h[7], v0.h[0]
365 ; CHECK-SD-NOFP16-NEXT: mov v0.16b, v2.16b
366 ; CHECK-SD-NOFP16-NEXT: ret
368 ; CHECK-SD-FP16-LABEL: fdiv_v8f16:
369 ; CHECK-SD-FP16: // %bb.0: // %entry
370 ; CHECK-SD-FP16-NEXT: fdiv v0.8h, v0.8h, v1.8h
371 ; CHECK-SD-FP16-NEXT: ret
373 ; CHECK-GI-NOFP16-LABEL: fdiv_v8f16:
374 ; CHECK-GI-NOFP16: // %bb.0: // %entry
375 ; CHECK-GI-NOFP16-NEXT: fcvtl v2.4s, v0.4h
376 ; CHECK-GI-NOFP16-NEXT: fcvtl v3.4s, v1.4h
377 ; CHECK-GI-NOFP16-NEXT: fcvtl2 v0.4s, v0.8h
378 ; CHECK-GI-NOFP16-NEXT: fcvtl2 v1.4s, v1.8h
379 ; CHECK-GI-NOFP16-NEXT: fdiv v2.4s, v2.4s, v3.4s
380 ; CHECK-GI-NOFP16-NEXT: fdiv v1.4s, v0.4s, v1.4s
381 ; CHECK-GI-NOFP16-NEXT: fcvtn v0.4h, v2.4s
382 ; CHECK-GI-NOFP16-NEXT: fcvtn2 v0.8h, v1.4s
383 ; CHECK-GI-NOFP16-NEXT: ret
385 ; CHECK-GI-FP16-LABEL: fdiv_v8f16:
386 ; CHECK-GI-FP16: // %bb.0: // %entry
387 ; CHECK-GI-FP16-NEXT: fdiv v0.8h, v0.8h, v1.8h
388 ; CHECK-GI-FP16-NEXT: ret
390 %c = fdiv <8 x half> %a, %b
394 define <16 x half> @fdiv_v16f16(<16 x half> %a, <16 x half> %b) {
395 ; CHECK-SD-NOFP16-LABEL: fdiv_v16f16:
396 ; CHECK-SD-NOFP16: // %bb.0: // %entry
397 ; CHECK-SD-NOFP16-NEXT: mov h4, v2.h[1]
398 ; CHECK-SD-NOFP16-NEXT: mov h5, v0.h[1]
399 ; CHECK-SD-NOFP16-NEXT: fcvt s6, h0
400 ; CHECK-SD-NOFP16-NEXT: mov h7, v0.h[2]
401 ; CHECK-SD-NOFP16-NEXT: mov h16, v0.h[3]
402 ; CHECK-SD-NOFP16-NEXT: mov h17, v0.h[4]
403 ; CHECK-SD-NOFP16-NEXT: mov h18, v0.h[5]
404 ; CHECK-SD-NOFP16-NEXT: mov h19, v0.h[6]
405 ; CHECK-SD-NOFP16-NEXT: mov h0, v0.h[7]
406 ; CHECK-SD-NOFP16-NEXT: fcvt s20, h1
407 ; CHECK-SD-NOFP16-NEXT: mov h21, v1.h[2]
408 ; CHECK-SD-NOFP16-NEXT: mov h22, v1.h[3]
409 ; CHECK-SD-NOFP16-NEXT: fcvt s4, h4
410 ; CHECK-SD-NOFP16-NEXT: fcvt s5, h5
411 ; CHECK-SD-NOFP16-NEXT: mov h23, v1.h[4]
412 ; CHECK-SD-NOFP16-NEXT: fcvt s7, h7
413 ; CHECK-SD-NOFP16-NEXT: fcvt s16, h16
414 ; CHECK-SD-NOFP16-NEXT: fcvt s17, h17
415 ; CHECK-SD-NOFP16-NEXT: fcvt s18, h18
416 ; CHECK-SD-NOFP16-NEXT: fcvt s19, h19
417 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h0
418 ; CHECK-SD-NOFP16-NEXT: fcvt s21, h21
419 ; CHECK-SD-NOFP16-NEXT: fcvt s22, h22
420 ; CHECK-SD-NOFP16-NEXT: mov h24, v1.h[5]
421 ; CHECK-SD-NOFP16-NEXT: fdiv s4, s5, s4
422 ; CHECK-SD-NOFP16-NEXT: fcvt s5, h2
423 ; CHECK-SD-NOFP16-NEXT: fcvt s23, h23
424 ; CHECK-SD-NOFP16-NEXT: mov h25, v1.h[6]
425 ; CHECK-SD-NOFP16-NEXT: fcvt s24, h24
426 ; CHECK-SD-NOFP16-NEXT: fcvt s25, h25
427 ; CHECK-SD-NOFP16-NEXT: fdiv s5, s6, s5
428 ; CHECK-SD-NOFP16-NEXT: mov h6, v2.h[2]
429 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s4
430 ; CHECK-SD-NOFP16-NEXT: fcvt s6, h6
431 ; CHECK-SD-NOFP16-NEXT: fdiv s6, s7, s6
432 ; CHECK-SD-NOFP16-NEXT: mov h7, v2.h[3]
433 ; CHECK-SD-NOFP16-NEXT: fcvt s7, h7
434 ; CHECK-SD-NOFP16-NEXT: fdiv s7, s16, s7
435 ; CHECK-SD-NOFP16-NEXT: mov h16, v2.h[4]
436 ; CHECK-SD-NOFP16-NEXT: fcvt s16, h16
437 ; CHECK-SD-NOFP16-NEXT: fdiv s16, s17, s16
438 ; CHECK-SD-NOFP16-NEXT: mov h17, v2.h[5]
439 ; CHECK-SD-NOFP16-NEXT: fcvt s17, h17
440 ; CHECK-SD-NOFP16-NEXT: fdiv s17, s18, s17
441 ; CHECK-SD-NOFP16-NEXT: mov h18, v2.h[6]
442 ; CHECK-SD-NOFP16-NEXT: mov h2, v2.h[7]
443 ; CHECK-SD-NOFP16-NEXT: fcvt s18, h18
444 ; CHECK-SD-NOFP16-NEXT: fcvt s2, h2
445 ; CHECK-SD-NOFP16-NEXT: fdiv s18, s19, s18
446 ; CHECK-SD-NOFP16-NEXT: fdiv s19, s0, s2
447 ; CHECK-SD-NOFP16-NEXT: mov h0, v3.h[1]
448 ; CHECK-SD-NOFP16-NEXT: mov h2, v1.h[1]
449 ; CHECK-SD-NOFP16-NEXT: mov h1, v1.h[7]
450 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h0
451 ; CHECK-SD-NOFP16-NEXT: fcvt s2, h2
452 ; CHECK-SD-NOFP16-NEXT: fcvt s1, h1
453 ; CHECK-SD-NOFP16-NEXT: fdiv s2, s2, s0
454 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h3
455 ; CHECK-SD-NOFP16-NEXT: fdiv s20, s20, s0
456 ; CHECK-SD-NOFP16-NEXT: mov h0, v3.h[2]
457 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h0
458 ; CHECK-SD-NOFP16-NEXT: fdiv s21, s21, s0
459 ; CHECK-SD-NOFP16-NEXT: mov h0, v3.h[3]
460 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h0
461 ; CHECK-SD-NOFP16-NEXT: fdiv s22, s22, s0
462 ; CHECK-SD-NOFP16-NEXT: mov h0, v3.h[4]
463 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h0
464 ; CHECK-SD-NOFP16-NEXT: fdiv s23, s23, s0
465 ; CHECK-SD-NOFP16-NEXT: mov h0, v3.h[5]
466 ; CHECK-SD-NOFP16-NEXT: fcvt s0, h0
467 ; CHECK-SD-NOFP16-NEXT: fdiv s24, s24, s0
468 ; CHECK-SD-NOFP16-NEXT: mov h0, v3.h[6]
469 ; CHECK-SD-NOFP16-NEXT: mov h3, v3.h[7]
470 ; CHECK-SD-NOFP16-NEXT: fcvt s26, h0
471 ; CHECK-SD-NOFP16-NEXT: fcvt h0, s5
472 ; CHECK-SD-NOFP16-NEXT: fcvt h5, s2
473 ; CHECK-SD-NOFP16-NEXT: fcvt h2, s20
474 ; CHECK-SD-NOFP16-NEXT: fcvt s3, h3
475 ; CHECK-SD-NOFP16-NEXT: mov v0.h[1], v4.h[0]
476 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s6
477 ; CHECK-SD-NOFP16-NEXT: mov v2.h[1], v5.h[0]
478 ; CHECK-SD-NOFP16-NEXT: fcvt h5, s21
479 ; CHECK-SD-NOFP16-NEXT: fdiv s20, s25, s26
480 ; CHECK-SD-NOFP16-NEXT: mov v0.h[2], v4.h[0]
481 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s7
482 ; CHECK-SD-NOFP16-NEXT: mov v2.h[2], v5.h[0]
483 ; CHECK-SD-NOFP16-NEXT: fcvt h5, s22
484 ; CHECK-SD-NOFP16-NEXT: mov v0.h[3], v4.h[0]
485 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s23
486 ; CHECK-SD-NOFP16-NEXT: mov v2.h[3], v5.h[0]
487 ; CHECK-SD-NOFP16-NEXT: fdiv s1, s1, s3
488 ; CHECK-SD-NOFP16-NEXT: fcvt h3, s16
489 ; CHECK-SD-NOFP16-NEXT: mov v2.h[4], v4.h[0]
490 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s24
491 ; CHECK-SD-NOFP16-NEXT: mov v0.h[4], v3.h[0]
492 ; CHECK-SD-NOFP16-NEXT: fcvt h3, s17
493 ; CHECK-SD-NOFP16-NEXT: mov v2.h[5], v4.h[0]
494 ; CHECK-SD-NOFP16-NEXT: fcvt h4, s20
495 ; CHECK-SD-NOFP16-NEXT: mov v0.h[5], v3.h[0]
496 ; CHECK-SD-NOFP16-NEXT: fcvt h3, s18
497 ; CHECK-SD-NOFP16-NEXT: mov v2.h[6], v4.h[0]
498 ; CHECK-SD-NOFP16-NEXT: mov v0.h[6], v3.h[0]
499 ; CHECK-SD-NOFP16-NEXT: fcvt h3, s19
500 ; CHECK-SD-NOFP16-NEXT: fcvt h1, s1
501 ; CHECK-SD-NOFP16-NEXT: mov v0.h[7], v3.h[0]
502 ; CHECK-SD-NOFP16-NEXT: mov v2.h[7], v1.h[0]
503 ; CHECK-SD-NOFP16-NEXT: mov v1.16b, v2.16b
504 ; CHECK-SD-NOFP16-NEXT: ret
506 ; CHECK-SD-FP16-LABEL: fdiv_v16f16:
507 ; CHECK-SD-FP16: // %bb.0: // %entry
508 ; CHECK-SD-FP16-NEXT: fdiv v1.8h, v1.8h, v3.8h
509 ; CHECK-SD-FP16-NEXT: fdiv v0.8h, v0.8h, v2.8h
510 ; CHECK-SD-FP16-NEXT: ret
512 ; CHECK-GI-NOFP16-LABEL: fdiv_v16f16:
513 ; CHECK-GI-NOFP16: // %bb.0: // %entry
514 ; CHECK-GI-NOFP16-NEXT: fcvtl v4.4s, v0.4h
515 ; CHECK-GI-NOFP16-NEXT: fcvtl v5.4s, v2.4h
516 ; CHECK-GI-NOFP16-NEXT: fcvtl2 v0.4s, v0.8h
517 ; CHECK-GI-NOFP16-NEXT: fcvtl2 v2.4s, v2.8h
518 ; CHECK-GI-NOFP16-NEXT: fdiv v4.4s, v4.4s, v5.4s
519 ; CHECK-GI-NOFP16-NEXT: fcvtl v5.4s, v3.4h
520 ; CHECK-GI-NOFP16-NEXT: fdiv v2.4s, v0.4s, v2.4s
521 ; CHECK-GI-NOFP16-NEXT: fcvtl v0.4s, v1.4h
522 ; CHECK-GI-NOFP16-NEXT: fdiv v5.4s, v0.4s, v5.4s
523 ; CHECK-GI-NOFP16-NEXT: fcvtl2 v0.4s, v1.8h
524 ; CHECK-GI-NOFP16-NEXT: fcvtl2 v1.4s, v3.8h
525 ; CHECK-GI-NOFP16-NEXT: fdiv v3.4s, v0.4s, v1.4s
526 ; CHECK-GI-NOFP16-NEXT: fcvtn v0.4h, v4.4s
527 ; CHECK-GI-NOFP16-NEXT: fcvtn v1.4h, v5.4s
528 ; CHECK-GI-NOFP16-NEXT: fcvtn2 v0.8h, v2.4s
529 ; CHECK-GI-NOFP16-NEXT: fcvtn2 v1.8h, v3.4s
530 ; CHECK-GI-NOFP16-NEXT: ret
532 ; CHECK-GI-FP16-LABEL: fdiv_v16f16:
533 ; CHECK-GI-FP16: // %bb.0: // %entry
534 ; CHECK-GI-FP16-NEXT: fdiv v0.8h, v0.8h, v2.8h
535 ; CHECK-GI-FP16-NEXT: fdiv v1.8h, v1.8h, v3.8h
536 ; CHECK-GI-FP16-NEXT: ret
538 %c = fdiv <16 x half> %a, %b