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
3 ; RUN: llc -mtriple=aarch64-none-eabi -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD
4 ; RUN: llc -mtriple=aarch64-none-eabi -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI
5 ; RUN: llc -mtriple=aarch64-none-eabi -mattr=+fullfp16 -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI
7 define double @frem_f64(double %a, double %b) {
8 ; CHECK-SD-LABEL: frem_f64:
9 ; CHECK-SD: // %bb.0: // %entry
10 ; CHECK-SD-NEXT: b fmod
12 ; CHECK-GI-LABEL: frem_f64:
13 ; CHECK-GI: // %bb.0: // %entry
14 ; CHECK-GI-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
15 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 16
16 ; CHECK-GI-NEXT: .cfi_offset w30, -16
17 ; CHECK-GI-NEXT: bl fmod
18 ; CHECK-GI-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
21 %c = frem double %a, %b
25 define float @frem_f32(float %a, float %b) {
26 ; CHECK-SD-LABEL: frem_f32:
27 ; CHECK-SD: // %bb.0: // %entry
28 ; CHECK-SD-NEXT: b fmodf
30 ; CHECK-GI-LABEL: frem_f32:
31 ; CHECK-GI: // %bb.0: // %entry
32 ; CHECK-GI-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
33 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 16
34 ; CHECK-GI-NEXT: .cfi_offset w30, -16
35 ; CHECK-GI-NEXT: bl fmodf
36 ; CHECK-GI-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
39 %c = frem float %a, %b
43 define half @frem_f16(half %a, half %b) {
44 ; CHECK-LABEL: frem_f16:
45 ; CHECK: // %bb.0: // %entry
46 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
47 ; CHECK-NEXT: .cfi_def_cfa_offset 16
48 ; CHECK-NEXT: .cfi_offset w30, -16
49 ; CHECK-NEXT: fcvt s0, h0
50 ; CHECK-NEXT: fcvt s1, h1
51 ; CHECK-NEXT: bl fmodf
52 ; CHECK-NEXT: fcvt h0, s0
53 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
60 define <2 x double> @frem_v2f64(<2 x double> %a, <2 x double> %b) {
61 ; CHECK-SD-LABEL: frem_v2f64:
62 ; CHECK-SD: // %bb.0: // %entry
63 ; CHECK-SD-NEXT: sub sp, sp, #64
64 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
65 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
66 ; CHECK-SD-NEXT: .cfi_offset w30, -16
67 ; CHECK-SD-NEXT: stp q0, q1, [sp] // 32-byte Folded Spill
68 ; CHECK-SD-NEXT: mov d0, v0.d[1]
69 ; CHECK-SD-NEXT: mov d1, v1.d[1]
70 ; CHECK-SD-NEXT: bl fmod
71 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
72 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
73 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
74 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
75 ; CHECK-SD-NEXT: bl fmod
76 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
77 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
78 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
79 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
80 ; CHECK-SD-NEXT: add sp, sp, #64
83 ; CHECK-GI-LABEL: frem_v2f64:
84 ; CHECK-GI: // %bb.0: // %entry
85 ; CHECK-GI-NEXT: sub sp, sp, #48
86 ; CHECK-GI-NEXT: stp d9, d8, [sp, #16] // 16-byte Folded Spill
87 ; CHECK-GI-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
88 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 48
89 ; CHECK-GI-NEXT: .cfi_offset w30, -16
90 ; CHECK-GI-NEXT: .cfi_offset b8, -24
91 ; CHECK-GI-NEXT: .cfi_offset b9, -32
92 ; CHECK-GI-NEXT: mov d8, v0.d[1]
93 ; CHECK-GI-NEXT: mov d9, v1.d[1]
94 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
95 ; CHECK-GI-NEXT: // kill: def $d1 killed $d1 killed $q1
96 ; CHECK-GI-NEXT: bl fmod
97 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
98 ; CHECK-GI-NEXT: fmov d0, d8
99 ; CHECK-GI-NEXT: fmov d1, d9
100 ; CHECK-GI-NEXT: bl fmod
101 ; CHECK-GI-NEXT: ldr q1, [sp] // 16-byte Folded Reload
102 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
103 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #16] // 16-byte Folded Reload
104 ; CHECK-GI-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
105 ; CHECK-GI-NEXT: mov v1.d[1], v0.d[0]
106 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
107 ; CHECK-GI-NEXT: add sp, sp, #48
110 %c = frem <2 x double> %a, %b
114 define <3 x double> @frem_v3f64(<3 x double> %a, <3 x double> %b) {
115 ; CHECK-SD-LABEL: frem_v3f64:
116 ; CHECK-SD: // %bb.0: // %entry
117 ; CHECK-SD-NEXT: str d12, [sp, #-48]! // 8-byte Folded Spill
118 ; CHECK-SD-NEXT: stp d11, d10, [sp, #8] // 16-byte Folded Spill
119 ; CHECK-SD-NEXT: stp d9, d8, [sp, #24] // 16-byte Folded Spill
120 ; CHECK-SD-NEXT: str x30, [sp, #40] // 8-byte Folded Spill
121 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
122 ; CHECK-SD-NEXT: .cfi_offset w30, -8
123 ; CHECK-SD-NEXT: .cfi_offset b8, -16
124 ; CHECK-SD-NEXT: .cfi_offset b9, -24
125 ; CHECK-SD-NEXT: .cfi_offset b10, -32
126 ; CHECK-SD-NEXT: .cfi_offset b11, -40
127 ; CHECK-SD-NEXT: .cfi_offset b12, -48
128 ; CHECK-SD-NEXT: fmov d11, d1
129 ; CHECK-SD-NEXT: fmov d1, d3
130 ; CHECK-SD-NEXT: fmov d8, d5
131 ; CHECK-SD-NEXT: fmov d9, d4
132 ; CHECK-SD-NEXT: fmov d10, d2
133 ; CHECK-SD-NEXT: bl fmod
134 ; CHECK-SD-NEXT: fmov d12, d0
135 ; CHECK-SD-NEXT: fmov d0, d11
136 ; CHECK-SD-NEXT: fmov d1, d9
137 ; CHECK-SD-NEXT: bl fmod
138 ; CHECK-SD-NEXT: fmov d9, d0
139 ; CHECK-SD-NEXT: fmov d0, d10
140 ; CHECK-SD-NEXT: fmov d1, d8
141 ; CHECK-SD-NEXT: bl fmod
142 ; CHECK-SD-NEXT: fmov d1, d9
143 ; CHECK-SD-NEXT: ldp d9, d8, [sp, #24] // 16-byte Folded Reload
144 ; CHECK-SD-NEXT: ldp d11, d10, [sp, #8] // 16-byte Folded Reload
145 ; CHECK-SD-NEXT: fmov d2, d0
146 ; CHECK-SD-NEXT: ldr x30, [sp, #40] // 8-byte Folded Reload
147 ; CHECK-SD-NEXT: fmov d0, d12
148 ; CHECK-SD-NEXT: ldr d12, [sp], #48 // 8-byte Folded Reload
151 ; CHECK-GI-LABEL: frem_v3f64:
152 ; CHECK-GI: // %bb.0: // %entry
153 ; CHECK-GI-NEXT: str d12, [sp, #-48]! // 8-byte Folded Spill
154 ; CHECK-GI-NEXT: stp d11, d10, [sp, #8] // 16-byte Folded Spill
155 ; CHECK-GI-NEXT: stp d9, d8, [sp, #24] // 16-byte Folded Spill
156 ; CHECK-GI-NEXT: str x30, [sp, #40] // 8-byte Folded Spill
157 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 48
158 ; CHECK-GI-NEXT: .cfi_offset w30, -8
159 ; CHECK-GI-NEXT: .cfi_offset b8, -16
160 ; CHECK-GI-NEXT: .cfi_offset b9, -24
161 ; CHECK-GI-NEXT: .cfi_offset b10, -32
162 ; CHECK-GI-NEXT: .cfi_offset b11, -40
163 ; CHECK-GI-NEXT: .cfi_offset b12, -48
164 ; CHECK-GI-NEXT: fmov d8, d1
165 ; CHECK-GI-NEXT: fmov d1, d3
166 ; CHECK-GI-NEXT: fmov d9, d2
167 ; CHECK-GI-NEXT: fmov d10, d4
168 ; CHECK-GI-NEXT: fmov d11, d5
169 ; CHECK-GI-NEXT: bl fmod
170 ; CHECK-GI-NEXT: fmov d12, d0
171 ; CHECK-GI-NEXT: fmov d0, d8
172 ; CHECK-GI-NEXT: fmov d1, d10
173 ; CHECK-GI-NEXT: bl fmod
174 ; CHECK-GI-NEXT: fmov d8, d0
175 ; CHECK-GI-NEXT: fmov d0, d9
176 ; CHECK-GI-NEXT: fmov d1, d11
177 ; CHECK-GI-NEXT: bl fmod
178 ; CHECK-GI-NEXT: fmov d1, d8
179 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #24] // 16-byte Folded Reload
180 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #8] // 16-byte Folded Reload
181 ; CHECK-GI-NEXT: fmov d2, d0
182 ; CHECK-GI-NEXT: ldr x30, [sp, #40] // 8-byte Folded Reload
183 ; CHECK-GI-NEXT: fmov d0, d12
184 ; CHECK-GI-NEXT: ldr d12, [sp], #48 // 8-byte Folded Reload
187 %c = frem <3 x double> %a, %b
191 define <4 x double> @frem_v4f64(<4 x double> %a, <4 x double> %b) {
192 ; CHECK-SD-LABEL: frem_v4f64:
193 ; CHECK-SD: // %bb.0: // %entry
194 ; CHECK-SD-NEXT: sub sp, sp, #96
195 ; CHECK-SD-NEXT: str x30, [sp, #80] // 8-byte Folded Spill
196 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 96
197 ; CHECK-SD-NEXT: .cfi_offset w30, -16
198 ; CHECK-SD-NEXT: stp q0, q2, [sp] // 32-byte Folded Spill
199 ; CHECK-SD-NEXT: mov d0, v0.d[1]
200 ; CHECK-SD-NEXT: stp q1, q3, [sp, #48] // 32-byte Folded Spill
201 ; CHECK-SD-NEXT: mov d1, v2.d[1]
202 ; CHECK-SD-NEXT: bl fmod
203 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
204 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
205 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
206 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
207 ; CHECK-SD-NEXT: bl fmod
208 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
209 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
210 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
211 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
212 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #48] // 32-byte Folded Reload
213 ; CHECK-SD-NEXT: mov d0, v0.d[1]
214 ; CHECK-SD-NEXT: mov d1, v1.d[1]
215 ; CHECK-SD-NEXT: bl fmod
216 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
217 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #48] // 32-byte Folded Reload
218 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
219 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
220 ; CHECK-SD-NEXT: bl fmod
221 ; CHECK-SD-NEXT: fmov d1, d0
222 ; CHECK-SD-NEXT: ldp q2, q0, [sp, #16] // 32-byte Folded Reload
223 ; CHECK-SD-NEXT: ldr x30, [sp, #80] // 8-byte Folded Reload
224 ; CHECK-SD-NEXT: mov v1.d[1], v2.d[0]
225 ; CHECK-SD-NEXT: add sp, sp, #96
228 ; CHECK-GI-LABEL: frem_v4f64:
229 ; CHECK-GI: // %bb.0: // %entry
230 ; CHECK-GI-NEXT: sub sp, sp, #112
231 ; CHECK-GI-NEXT: stp d11, d10, [sp, #64] // 16-byte Folded Spill
232 ; CHECK-GI-NEXT: stp d9, d8, [sp, #80] // 16-byte Folded Spill
233 ; CHECK-GI-NEXT: str x30, [sp, #96] // 8-byte Folded Spill
234 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 112
235 ; CHECK-GI-NEXT: .cfi_offset w30, -16
236 ; CHECK-GI-NEXT: .cfi_offset b8, -24
237 ; CHECK-GI-NEXT: .cfi_offset b9, -32
238 ; CHECK-GI-NEXT: .cfi_offset b10, -40
239 ; CHECK-GI-NEXT: .cfi_offset b11, -48
240 ; CHECK-GI-NEXT: mov v4.16b, v1.16b
241 ; CHECK-GI-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
242 ; CHECK-GI-NEXT: mov v1.16b, v2.16b
243 ; CHECK-GI-NEXT: str q3, [sp] // 16-byte Folded Spill
244 ; CHECK-GI-NEXT: mov d8, v0.d[1]
245 ; CHECK-GI-NEXT: mov d10, v2.d[1]
246 ; CHECK-GI-NEXT: mov d11, v3.d[1]
247 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
248 ; CHECK-GI-NEXT: // kill: def $d1 killed $d1 killed $q1
249 ; CHECK-GI-NEXT: mov d9, v4.d[1]
250 ; CHECK-GI-NEXT: bl fmod
251 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
252 ; CHECK-GI-NEXT: fmov d0, d8
253 ; CHECK-GI-NEXT: fmov d1, d10
254 ; CHECK-GI-NEXT: bl fmod
255 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
256 ; CHECK-GI-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
257 ; CHECK-GI-NEXT: ldr q1, [sp] // 16-byte Folded Reload
258 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
259 ; CHECK-GI-NEXT: // kill: def $d1 killed $d1 killed $q1
260 ; CHECK-GI-NEXT: bl fmod
261 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
262 ; CHECK-GI-NEXT: fmov d0, d9
263 ; CHECK-GI-NEXT: fmov d1, d11
264 ; CHECK-GI-NEXT: bl fmod
265 ; CHECK-GI-NEXT: ldr q2, [sp, #48] // 16-byte Folded Reload
266 ; CHECK-GI-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
267 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
268 ; CHECK-GI-NEXT: ldr x30, [sp, #96] // 8-byte Folded Reload
269 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #80] // 16-byte Folded Reload
270 ; CHECK-GI-NEXT: mov v2.d[1], v1.d[0]
271 ; CHECK-GI-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
272 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #64] // 16-byte Folded Reload
273 ; CHECK-GI-NEXT: mov v1.d[1], v0.d[0]
274 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
275 ; CHECK-GI-NEXT: add sp, sp, #112
278 %c = frem <4 x double> %a, %b
282 define <2 x float> @frem_v2f32(<2 x float> %a, <2 x float> %b) {
283 ; CHECK-SD-LABEL: frem_v2f32:
284 ; CHECK-SD: // %bb.0: // %entry
285 ; CHECK-SD-NEXT: sub sp, sp, #64
286 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
287 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
288 ; CHECK-SD-NEXT: .cfi_offset w30, -16
289 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 def $q1
290 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
291 ; CHECK-SD-NEXT: stp q0, q1, [sp] // 32-byte Folded Spill
292 ; CHECK-SD-NEXT: mov s0, v0.s[1]
293 ; CHECK-SD-NEXT: mov s1, v1.s[1]
294 ; CHECK-SD-NEXT: bl fmodf
295 ; CHECK-SD-NEXT: str d0, [sp, #32] // 16-byte Folded Spill
296 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
297 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
298 ; CHECK-SD-NEXT: // kill: def $s1 killed $s1 killed $q1
299 ; CHECK-SD-NEXT: bl fmodf
300 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
301 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
302 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
303 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
304 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
305 ; CHECK-SD-NEXT: add sp, sp, #64
308 ; CHECK-GI-LABEL: frem_v2f32:
309 ; CHECK-GI: // %bb.0: // %entry
310 ; CHECK-GI-NEXT: sub sp, sp, #48
311 ; CHECK-GI-NEXT: stp d9, d8, [sp, #16] // 16-byte Folded Spill
312 ; CHECK-GI-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
313 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 48
314 ; CHECK-GI-NEXT: .cfi_offset w30, -16
315 ; CHECK-GI-NEXT: .cfi_offset b8, -24
316 ; CHECK-GI-NEXT: .cfi_offset b9, -32
317 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
318 ; CHECK-GI-NEXT: // kill: def $d1 killed $d1 def $q1
319 ; CHECK-GI-NEXT: mov s8, v0.s[1]
320 ; CHECK-GI-NEXT: mov s9, v1.s[1]
321 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
322 ; CHECK-GI-NEXT: // kill: def $s1 killed $s1 killed $q1
323 ; CHECK-GI-NEXT: bl fmodf
324 ; CHECK-GI-NEXT: str d0, [sp] // 16-byte Folded Spill
325 ; CHECK-GI-NEXT: fmov s0, s8
326 ; CHECK-GI-NEXT: fmov s1, s9
327 ; CHECK-GI-NEXT: bl fmodf
328 ; CHECK-GI-NEXT: ldr q1, [sp] // 16-byte Folded Reload
329 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
330 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #16] // 16-byte Folded Reload
331 ; CHECK-GI-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
332 ; CHECK-GI-NEXT: mov v1.s[1], v0.s[0]
333 ; CHECK-GI-NEXT: fmov d0, d1
334 ; CHECK-GI-NEXT: add sp, sp, #48
337 %c = frem <2 x float> %a, %b
341 define <3 x float> @frem_v3f32(<3 x float> %a, <3 x float> %b) {
342 ; CHECK-SD-LABEL: frem_v3f32:
343 ; CHECK-SD: // %bb.0: // %entry
344 ; CHECK-SD-NEXT: sub sp, sp, #64
345 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
346 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
347 ; CHECK-SD-NEXT: .cfi_offset w30, -16
348 ; CHECK-SD-NEXT: stp q0, q1, [sp, #16] // 32-byte Folded Spill
349 ; CHECK-SD-NEXT: mov s0, v0.s[1]
350 ; CHECK-SD-NEXT: mov s1, v1.s[1]
351 ; CHECK-SD-NEXT: bl fmodf
352 ; CHECK-SD-NEXT: str d0, [sp] // 16-byte Folded Spill
353 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
354 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
355 ; CHECK-SD-NEXT: // kill: def $s1 killed $s1 killed $q1
356 ; CHECK-SD-NEXT: bl fmodf
357 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
358 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
359 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
360 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
361 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
362 ; CHECK-SD-NEXT: mov s0, v0.s[2]
363 ; CHECK-SD-NEXT: mov s1, v1.s[2]
364 ; CHECK-SD-NEXT: bl fmodf
365 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
366 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
367 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
368 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
369 ; CHECK-SD-NEXT: mov v0.16b, v1.16b
370 ; CHECK-SD-NEXT: add sp, sp, #64
373 ; CHECK-GI-LABEL: frem_v3f32:
374 ; CHECK-GI: // %bb.0: // %entry
375 ; CHECK-GI-NEXT: sub sp, sp, #80
376 ; CHECK-GI-NEXT: stp d11, d10, [sp, #32] // 16-byte Folded Spill
377 ; CHECK-GI-NEXT: stp d9, d8, [sp, #48] // 16-byte Folded Spill
378 ; CHECK-GI-NEXT: str x30, [sp, #64] // 8-byte Folded Spill
379 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 80
380 ; CHECK-GI-NEXT: .cfi_offset w30, -16
381 ; CHECK-GI-NEXT: .cfi_offset b8, -24
382 ; CHECK-GI-NEXT: .cfi_offset b9, -32
383 ; CHECK-GI-NEXT: .cfi_offset b10, -40
384 ; CHECK-GI-NEXT: .cfi_offset b11, -48
385 ; CHECK-GI-NEXT: mov s8, v0.s[1]
386 ; CHECK-GI-NEXT: mov s9, v0.s[2]
387 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
388 ; CHECK-GI-NEXT: mov s10, v1.s[1]
389 ; CHECK-GI-NEXT: mov s11, v1.s[2]
390 ; CHECK-GI-NEXT: // kill: def $s1 killed $s1 killed $q1
391 ; CHECK-GI-NEXT: bl fmodf
392 ; CHECK-GI-NEXT: str d0, [sp, #16] // 16-byte Folded Spill
393 ; CHECK-GI-NEXT: fmov s0, s8
394 ; CHECK-GI-NEXT: fmov s1, s10
395 ; CHECK-GI-NEXT: bl fmodf
396 ; CHECK-GI-NEXT: str d0, [sp] // 16-byte Folded Spill
397 ; CHECK-GI-NEXT: fmov s0, s9
398 ; CHECK-GI-NEXT: fmov s1, s11
399 ; CHECK-GI-NEXT: bl fmodf
400 ; CHECK-GI-NEXT: ldp q2, q1, [sp] // 32-byte Folded Reload
401 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
402 ; CHECK-GI-NEXT: ldr x30, [sp, #64] // 8-byte Folded Reload
403 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #48] // 16-byte Folded Reload
404 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #32] // 16-byte Folded Reload
405 ; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
406 ; CHECK-GI-NEXT: mov v1.s[2], v0.s[0]
407 ; CHECK-GI-NEXT: mov v1.s[3], v0.s[0]
408 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
409 ; CHECK-GI-NEXT: add sp, sp, #80
412 %c = frem <3 x float> %a, %b
416 define <4 x float> @frem_v4f32(<4 x float> %a, <4 x float> %b) {
417 ; CHECK-SD-LABEL: frem_v4f32:
418 ; CHECK-SD: // %bb.0: // %entry
419 ; CHECK-SD-NEXT: sub sp, sp, #64
420 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
421 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
422 ; CHECK-SD-NEXT: .cfi_offset w30, -16
423 ; CHECK-SD-NEXT: stp q0, q1, [sp, #16] // 32-byte Folded Spill
424 ; CHECK-SD-NEXT: mov s0, v0.s[1]
425 ; CHECK-SD-NEXT: mov s1, v1.s[1]
426 ; CHECK-SD-NEXT: bl fmodf
427 ; CHECK-SD-NEXT: str d0, [sp] // 16-byte Folded Spill
428 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
429 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
430 ; CHECK-SD-NEXT: // kill: def $s1 killed $s1 killed $q1
431 ; CHECK-SD-NEXT: bl fmodf
432 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
433 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
434 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
435 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
436 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
437 ; CHECK-SD-NEXT: mov s0, v0.s[2]
438 ; CHECK-SD-NEXT: mov s1, v1.s[2]
439 ; CHECK-SD-NEXT: bl fmodf
440 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
441 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
442 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
443 ; CHECK-SD-NEXT: str q1, [sp] // 16-byte Folded Spill
444 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
445 ; CHECK-SD-NEXT: mov s0, v0.s[3]
446 ; CHECK-SD-NEXT: mov s1, v1.s[3]
447 ; CHECK-SD-NEXT: bl fmodf
448 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
449 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
450 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
451 ; CHECK-SD-NEXT: mov v1.s[3], v0.s[0]
452 ; CHECK-SD-NEXT: mov v0.16b, v1.16b
453 ; CHECK-SD-NEXT: add sp, sp, #64
456 ; CHECK-GI-LABEL: frem_v4f32:
457 ; CHECK-GI: // %bb.0: // %entry
458 ; CHECK-GI-NEXT: sub sp, sp, #112
459 ; CHECK-GI-NEXT: stp d13, d12, [sp, #48] // 16-byte Folded Spill
460 ; CHECK-GI-NEXT: stp d11, d10, [sp, #64] // 16-byte Folded Spill
461 ; CHECK-GI-NEXT: stp d9, d8, [sp, #80] // 16-byte Folded Spill
462 ; CHECK-GI-NEXT: str x30, [sp, #96] // 8-byte Folded Spill
463 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 112
464 ; CHECK-GI-NEXT: .cfi_offset w30, -16
465 ; CHECK-GI-NEXT: .cfi_offset b8, -24
466 ; CHECK-GI-NEXT: .cfi_offset b9, -32
467 ; CHECK-GI-NEXT: .cfi_offset b10, -40
468 ; CHECK-GI-NEXT: .cfi_offset b11, -48
469 ; CHECK-GI-NEXT: .cfi_offset b12, -56
470 ; CHECK-GI-NEXT: .cfi_offset b13, -64
471 ; CHECK-GI-NEXT: mov s8, v0.s[1]
472 ; CHECK-GI-NEXT: mov s9, v0.s[2]
473 ; CHECK-GI-NEXT: mov s10, v0.s[3]
474 ; CHECK-GI-NEXT: mov s11, v1.s[1]
475 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
476 ; CHECK-GI-NEXT: mov s12, v1.s[2]
477 ; CHECK-GI-NEXT: mov s13, v1.s[3]
478 ; CHECK-GI-NEXT: // kill: def $s1 killed $s1 killed $q1
479 ; CHECK-GI-NEXT: bl fmodf
480 ; CHECK-GI-NEXT: str d0, [sp, #32] // 16-byte Folded Spill
481 ; CHECK-GI-NEXT: fmov s0, s8
482 ; CHECK-GI-NEXT: fmov s1, s11
483 ; CHECK-GI-NEXT: bl fmodf
484 ; CHECK-GI-NEXT: str d0, [sp, #16] // 16-byte Folded Spill
485 ; CHECK-GI-NEXT: fmov s0, s9
486 ; CHECK-GI-NEXT: fmov s1, s12
487 ; CHECK-GI-NEXT: bl fmodf
488 ; CHECK-GI-NEXT: str d0, [sp] // 16-byte Folded Spill
489 ; CHECK-GI-NEXT: fmov s0, s10
490 ; CHECK-GI-NEXT: fmov s1, s13
491 ; CHECK-GI-NEXT: bl fmodf
492 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #16] // 32-byte Folded Reload
493 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
494 ; CHECK-GI-NEXT: ldr x30, [sp, #96] // 8-byte Folded Reload
495 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #80] // 16-byte Folded Reload
496 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #64] // 16-byte Folded Reload
497 ; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
498 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
499 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #48] // 16-byte Folded Reload
500 ; CHECK-GI-NEXT: mov v1.s[2], v2.s[0]
501 ; CHECK-GI-NEXT: mov v1.s[3], v0.s[0]
502 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
503 ; CHECK-GI-NEXT: add sp, sp, #112
506 %c = frem <4 x float> %a, %b
510 define <8 x float> @frem_v8f32(<8 x float> %a, <8 x float> %b) {
511 ; CHECK-SD-LABEL: frem_v8f32:
512 ; CHECK-SD: // %bb.0: // %entry
513 ; CHECK-SD-NEXT: sub sp, sp, #96
514 ; CHECK-SD-NEXT: str x30, [sp, #80] // 8-byte Folded Spill
515 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 96
516 ; CHECK-SD-NEXT: .cfi_offset w30, -16
517 ; CHECK-SD-NEXT: stp q0, q2, [sp] // 32-byte Folded Spill
518 ; CHECK-SD-NEXT: mov s0, v0.s[1]
519 ; CHECK-SD-NEXT: stp q1, q3, [sp, #32] // 32-byte Folded Spill
520 ; CHECK-SD-NEXT: mov s1, v2.s[1]
521 ; CHECK-SD-NEXT: bl fmodf
522 ; CHECK-SD-NEXT: str d0, [sp, #64] // 16-byte Folded Spill
523 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
524 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
525 ; CHECK-SD-NEXT: // kill: def $s1 killed $s1 killed $q1
526 ; CHECK-SD-NEXT: bl fmodf
527 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
528 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
529 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
530 ; CHECK-SD-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
531 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
532 ; CHECK-SD-NEXT: mov s0, v0.s[2]
533 ; CHECK-SD-NEXT: mov s1, v1.s[2]
534 ; CHECK-SD-NEXT: bl fmodf
535 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
536 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
537 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
538 ; CHECK-SD-NEXT: str q1, [sp, #64] // 16-byte Folded Spill
539 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
540 ; CHECK-SD-NEXT: mov s0, v0.s[3]
541 ; CHECK-SD-NEXT: mov s1, v1.s[3]
542 ; CHECK-SD-NEXT: bl fmodf
543 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
544 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
545 ; CHECK-SD-NEXT: mov v1.s[3], v0.s[0]
546 ; CHECK-SD-NEXT: str q1, [sp, #64] // 16-byte Folded Spill
547 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #32] // 32-byte Folded Reload
548 ; CHECK-SD-NEXT: mov s0, v0.s[1]
549 ; CHECK-SD-NEXT: mov s1, v1.s[1]
550 ; CHECK-SD-NEXT: bl fmodf
551 ; CHECK-SD-NEXT: str d0, [sp, #16] // 16-byte Folded Spill
552 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #32] // 32-byte Folded Reload
553 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
554 ; CHECK-SD-NEXT: // kill: def $s1 killed $s1 killed $q1
555 ; CHECK-SD-NEXT: bl fmodf
556 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
557 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
558 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
559 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
560 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #32] // 32-byte Folded Reload
561 ; CHECK-SD-NEXT: mov s0, v0.s[2]
562 ; CHECK-SD-NEXT: mov s1, v1.s[2]
563 ; CHECK-SD-NEXT: bl fmodf
564 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
565 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
566 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
567 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
568 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #32] // 32-byte Folded Reload
569 ; CHECK-SD-NEXT: mov s0, v0.s[3]
570 ; CHECK-SD-NEXT: mov s1, v1.s[3]
571 ; CHECK-SD-NEXT: bl fmodf
572 ; CHECK-SD-NEXT: fmov s2, s0
573 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
574 ; CHECK-SD-NEXT: ldr q0, [sp, #64] // 16-byte Folded Reload
575 ; CHECK-SD-NEXT: ldr x30, [sp, #80] // 8-byte Folded Reload
576 ; CHECK-SD-NEXT: mov v1.s[3], v2.s[0]
577 ; CHECK-SD-NEXT: add sp, sp, #96
580 ; CHECK-GI-LABEL: frem_v8f32:
581 ; CHECK-GI: // %bb.0: // %entry
582 ; CHECK-GI-NEXT: sub sp, sp, #208
583 ; CHECK-GI-NEXT: stp d15, d14, [sp, #128] // 16-byte Folded Spill
584 ; CHECK-GI-NEXT: stp d13, d12, [sp, #144] // 16-byte Folded Spill
585 ; CHECK-GI-NEXT: stp d11, d10, [sp, #160] // 16-byte Folded Spill
586 ; CHECK-GI-NEXT: stp d9, d8, [sp, #176] // 16-byte Folded Spill
587 ; CHECK-GI-NEXT: str x30, [sp, #192] // 8-byte Folded Spill
588 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 208
589 ; CHECK-GI-NEXT: .cfi_offset w30, -16
590 ; CHECK-GI-NEXT: .cfi_offset b8, -24
591 ; CHECK-GI-NEXT: .cfi_offset b9, -32
592 ; CHECK-GI-NEXT: .cfi_offset b10, -40
593 ; CHECK-GI-NEXT: .cfi_offset b11, -48
594 ; CHECK-GI-NEXT: .cfi_offset b12, -56
595 ; CHECK-GI-NEXT: .cfi_offset b13, -64
596 ; CHECK-GI-NEXT: .cfi_offset b14, -72
597 ; CHECK-GI-NEXT: .cfi_offset b15, -80
598 ; CHECK-GI-NEXT: mov v4.16b, v1.16b
599 ; CHECK-GI-NEXT: mov v1.16b, v2.16b
600 ; CHECK-GI-NEXT: mov s8, v0.s[1]
601 ; CHECK-GI-NEXT: mov s9, v0.s[2]
602 ; CHECK-GI-NEXT: mov s10, v0.s[3]
603 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
604 ; CHECK-GI-NEXT: mov s12, v3.s[1]
605 ; CHECK-GI-NEXT: mov s11, v3.s[2]
606 ; CHECK-GI-NEXT: mov s2, v4.s[1]
607 ; CHECK-GI-NEXT: stp q3, q4, [sp] // 32-byte Folded Spill
608 ; CHECK-GI-NEXT: mov s5, v4.s[3]
609 ; CHECK-GI-NEXT: mov s14, v1.s[1]
610 ; CHECK-GI-NEXT: mov s15, v1.s[2]
611 ; CHECK-GI-NEXT: mov s13, v1.s[3]
612 ; CHECK-GI-NEXT: // kill: def $s1 killed $s1 killed $q1
613 ; CHECK-GI-NEXT: str s2, [sp, #64] // 4-byte Folded Spill
614 ; CHECK-GI-NEXT: mov s2, v4.s[2]
615 ; CHECK-GI-NEXT: str s2, [sp, #112] // 4-byte Folded Spill
616 ; CHECK-GI-NEXT: mov s2, v3.s[3]
617 ; CHECK-GI-NEXT: stp s2, s5, [sp, #200] // 8-byte Folded Spill
618 ; CHECK-GI-NEXT: bl fmodf
619 ; CHECK-GI-NEXT: str d0, [sp, #96] // 16-byte Folded Spill
620 ; CHECK-GI-NEXT: fmov s0, s8
621 ; CHECK-GI-NEXT: fmov s1, s14
622 ; CHECK-GI-NEXT: bl fmodf
623 ; CHECK-GI-NEXT: str d0, [sp, #32] // 16-byte Folded Spill
624 ; CHECK-GI-NEXT: fmov s0, s9
625 ; CHECK-GI-NEXT: fmov s1, s15
626 ; CHECK-GI-NEXT: bl fmodf
627 ; CHECK-GI-NEXT: str d0, [sp, #80] // 16-byte Folded Spill
628 ; CHECK-GI-NEXT: fmov s0, s10
629 ; CHECK-GI-NEXT: fmov s1, s13
630 ; CHECK-GI-NEXT: bl fmodf
631 ; CHECK-GI-NEXT: str d0, [sp, #48] // 16-byte Folded Spill
632 ; CHECK-GI-NEXT: ldp q1, q0, [sp] // 32-byte Folded Reload
633 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
634 ; CHECK-GI-NEXT: // kill: def $s1 killed $s1 killed $q1
635 ; CHECK-GI-NEXT: bl fmodf
636 ; CHECK-GI-NEXT: fmov s1, s12
637 ; CHECK-GI-NEXT: str d0, [sp, #16] // 16-byte Folded Spill
638 ; CHECK-GI-NEXT: ldr s0, [sp, #64] // 4-byte Folded Reload
639 ; CHECK-GI-NEXT: bl fmodf
640 ; CHECK-GI-NEXT: fmov s1, s11
641 ; CHECK-GI-NEXT: str d0, [sp, #64] // 16-byte Folded Spill
642 ; CHECK-GI-NEXT: ldr s0, [sp, #112] // 4-byte Folded Reload
643 ; CHECK-GI-NEXT: bl fmodf
644 ; CHECK-GI-NEXT: str d0, [sp, #112] // 16-byte Folded Spill
645 ; CHECK-GI-NEXT: ldp s1, s0, [sp, #200] // 8-byte Folded Reload
646 ; CHECK-GI-NEXT: bl fmodf
647 ; CHECK-GI-NEXT: ldp q3, q2, [sp, #16] // 32-byte Folded Reload
648 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
649 ; CHECK-GI-NEXT: ldr q1, [sp, #96] // 16-byte Folded Reload
650 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #176] // 16-byte Folded Reload
651 ; CHECK-GI-NEXT: ldr x30, [sp, #192] // 8-byte Folded Reload
652 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #160] // 16-byte Folded Reload
653 ; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
654 ; CHECK-GI-NEXT: ldr q2, [sp, #64] // 16-byte Folded Reload
655 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #144] // 16-byte Folded Reload
656 ; CHECK-GI-NEXT: mov v3.s[1], v2.s[0]
657 ; CHECK-GI-NEXT: ldr q2, [sp, #80] // 16-byte Folded Reload
658 ; CHECK-GI-NEXT: ldp d15, d14, [sp, #128] // 16-byte Folded Reload
659 ; CHECK-GI-NEXT: mov v1.s[2], v2.s[0]
660 ; CHECK-GI-NEXT: ldr q2, [sp, #112] // 16-byte Folded Reload
661 ; CHECK-GI-NEXT: mov v3.s[2], v2.s[0]
662 ; CHECK-GI-NEXT: ldr q2, [sp, #48] // 16-byte Folded Reload
663 ; CHECK-GI-NEXT: mov v1.s[3], v2.s[0]
664 ; CHECK-GI-NEXT: mov v3.s[3], v0.s[0]
665 ; CHECK-GI-NEXT: mov v2.16b, v1.16b
666 ; CHECK-GI-NEXT: mov v1.16b, v3.16b
667 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
668 ; CHECK-GI-NEXT: add sp, sp, #208
671 %c = frem <8 x float> %a, %b
675 define <7 x half> @frem_v7f16(<7 x half> %a, <7 x half> %b) {
676 ; CHECK-SD-LABEL: frem_v7f16:
677 ; CHECK-SD: // %bb.0: // %entry
678 ; CHECK-SD-NEXT: sub sp, sp, #64
679 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
680 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
681 ; CHECK-SD-NEXT: .cfi_offset w30, -16
682 ; CHECK-SD-NEXT: mov h3, v0.h[1]
683 ; CHECK-SD-NEXT: mov h2, v1.h[1]
684 ; CHECK-SD-NEXT: stp q0, q1, [sp] // 32-byte Folded Spill
685 ; CHECK-SD-NEXT: fcvt s0, h3
686 ; CHECK-SD-NEXT: fcvt s1, h2
687 ; CHECK-SD-NEXT: bl fmodf
688 ; CHECK-SD-NEXT: fcvt h0, s0
689 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
690 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
691 ; CHECK-SD-NEXT: fcvt s0, h0
692 ; CHECK-SD-NEXT: fcvt s1, h1
693 ; CHECK-SD-NEXT: bl fmodf
694 ; CHECK-SD-NEXT: fcvt h0, s0
695 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
696 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
697 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
698 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
699 ; CHECK-SD-NEXT: mov h0, v0.h[2]
700 ; CHECK-SD-NEXT: mov h1, v1.h[2]
701 ; CHECK-SD-NEXT: fcvt s0, h0
702 ; CHECK-SD-NEXT: fcvt s1, h1
703 ; CHECK-SD-NEXT: bl fmodf
704 ; CHECK-SD-NEXT: fcvt h0, s0
705 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
706 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
707 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
708 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
709 ; CHECK-SD-NEXT: mov h0, v0.h[3]
710 ; CHECK-SD-NEXT: mov h1, v1.h[3]
711 ; CHECK-SD-NEXT: fcvt s0, h0
712 ; CHECK-SD-NEXT: fcvt s1, h1
713 ; CHECK-SD-NEXT: bl fmodf
714 ; CHECK-SD-NEXT: fcvt h0, s0
715 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
716 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
717 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
718 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
719 ; CHECK-SD-NEXT: mov h0, v0.h[4]
720 ; CHECK-SD-NEXT: mov h1, v1.h[4]
721 ; CHECK-SD-NEXT: fcvt s0, h0
722 ; CHECK-SD-NEXT: fcvt s1, h1
723 ; CHECK-SD-NEXT: bl fmodf
724 ; CHECK-SD-NEXT: fcvt h0, s0
725 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
726 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
727 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
728 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
729 ; CHECK-SD-NEXT: mov h0, v0.h[5]
730 ; CHECK-SD-NEXT: mov h1, v1.h[5]
731 ; CHECK-SD-NEXT: fcvt s0, h0
732 ; CHECK-SD-NEXT: fcvt s1, h1
733 ; CHECK-SD-NEXT: bl fmodf
734 ; CHECK-SD-NEXT: fcvt h0, s0
735 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
736 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
737 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
738 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
739 ; CHECK-SD-NEXT: mov h0, v0.h[6]
740 ; CHECK-SD-NEXT: mov h1, v1.h[6]
741 ; CHECK-SD-NEXT: fcvt s0, h0
742 ; CHECK-SD-NEXT: fcvt s1, h1
743 ; CHECK-SD-NEXT: bl fmodf
744 ; CHECK-SD-NEXT: fcvt h0, s0
745 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
746 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
747 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
748 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
749 ; CHECK-SD-NEXT: mov h0, v0.h[7]
750 ; CHECK-SD-NEXT: mov h1, v1.h[7]
751 ; CHECK-SD-NEXT: fcvt s0, h0
752 ; CHECK-SD-NEXT: fcvt s1, h1
753 ; CHECK-SD-NEXT: bl fmodf
754 ; CHECK-SD-NEXT: fcvt h1, s0
755 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
756 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
757 ; CHECK-SD-NEXT: mov v0.h[7], v1.h[0]
758 ; CHECK-SD-NEXT: add sp, sp, #64
761 ; CHECK-GI-LABEL: frem_v7f16:
762 ; CHECK-GI: // %bb.0: // %entry
763 ; CHECK-GI-NEXT: sub sp, sp, #176
764 ; CHECK-GI-NEXT: stp d15, d14, [sp, #96] // 16-byte Folded Spill
765 ; CHECK-GI-NEXT: stp d13, d12, [sp, #112] // 16-byte Folded Spill
766 ; CHECK-GI-NEXT: stp d11, d10, [sp, #128] // 16-byte Folded Spill
767 ; CHECK-GI-NEXT: stp d9, d8, [sp, #144] // 16-byte Folded Spill
768 ; CHECK-GI-NEXT: str x30, [sp, #160] // 8-byte Folded Spill
769 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 176
770 ; CHECK-GI-NEXT: .cfi_offset w30, -16
771 ; CHECK-GI-NEXT: .cfi_offset b8, -24
772 ; CHECK-GI-NEXT: .cfi_offset b9, -32
773 ; CHECK-GI-NEXT: .cfi_offset b10, -40
774 ; CHECK-GI-NEXT: .cfi_offset b11, -48
775 ; CHECK-GI-NEXT: .cfi_offset b12, -56
776 ; CHECK-GI-NEXT: .cfi_offset b13, -64
777 ; CHECK-GI-NEXT: .cfi_offset b14, -72
778 ; CHECK-GI-NEXT: .cfi_offset b15, -80
779 ; CHECK-GI-NEXT: mov h2, v0.h[5]
780 ; CHECK-GI-NEXT: mov h8, v0.h[1]
781 ; CHECK-GI-NEXT: mov h9, v0.h[2]
782 ; CHECK-GI-NEXT: mov h10, v0.h[3]
783 ; CHECK-GI-NEXT: mov h11, v0.h[4]
784 ; CHECK-GI-NEXT: mov h14, v1.h[1]
785 ; CHECK-GI-NEXT: mov h15, v1.h[2]
786 ; CHECK-GI-NEXT: mov h13, v1.h[3]
787 ; CHECK-GI-NEXT: mov h12, v1.h[4]
788 ; CHECK-GI-NEXT: str h2, [sp, #64] // 2-byte Folded Spill
789 ; CHECK-GI-NEXT: mov h2, v0.h[6]
790 ; CHECK-GI-NEXT: fcvt s0, h0
791 ; CHECK-GI-NEXT: str h2, [sp, #80] // 2-byte Folded Spill
792 ; CHECK-GI-NEXT: mov h2, v1.h[5]
793 ; CHECK-GI-NEXT: str h2, [sp, #172] // 2-byte Folded Spill
794 ; CHECK-GI-NEXT: mov h2, v1.h[6]
795 ; CHECK-GI-NEXT: fcvt s1, h1
796 ; CHECK-GI-NEXT: str h2, [sp, #174] // 2-byte Folded Spill
797 ; CHECK-GI-NEXT: bl fmodf
798 ; CHECK-GI-NEXT: fcvt s2, h8
799 ; CHECK-GI-NEXT: fcvt h0, s0
800 ; CHECK-GI-NEXT: fcvt s1, h14
801 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
802 ; CHECK-GI-NEXT: fmov s0, s2
803 ; CHECK-GI-NEXT: bl fmodf
804 ; CHECK-GI-NEXT: fcvt s2, h9
805 ; CHECK-GI-NEXT: fcvt h0, s0
806 ; CHECK-GI-NEXT: fcvt s1, h15
807 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
808 ; CHECK-GI-NEXT: fmov s0, s2
809 ; CHECK-GI-NEXT: bl fmodf
810 ; CHECK-GI-NEXT: fcvt s2, h10
811 ; CHECK-GI-NEXT: fcvt h0, s0
812 ; CHECK-GI-NEXT: fcvt s1, h13
813 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
814 ; CHECK-GI-NEXT: fmov s0, s2
815 ; CHECK-GI-NEXT: bl fmodf
816 ; CHECK-GI-NEXT: fcvt s2, h11
817 ; CHECK-GI-NEXT: fcvt h0, s0
818 ; CHECK-GI-NEXT: fcvt s1, h12
819 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
820 ; CHECK-GI-NEXT: fmov s0, s2
821 ; CHECK-GI-NEXT: bl fmodf
822 ; CHECK-GI-NEXT: ldr h1, [sp, #64] // 2-byte Folded Reload
823 ; CHECK-GI-NEXT: fcvt h0, s0
824 ; CHECK-GI-NEXT: fcvt s2, h1
825 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
826 ; CHECK-GI-NEXT: ldr h0, [sp, #172] // 2-byte Folded Reload
827 ; CHECK-GI-NEXT: fcvt s1, h0
828 ; CHECK-GI-NEXT: fmov s0, s2
829 ; CHECK-GI-NEXT: bl fmodf
830 ; CHECK-GI-NEXT: ldr h1, [sp, #80] // 2-byte Folded Reload
831 ; CHECK-GI-NEXT: fcvt h0, s0
832 ; CHECK-GI-NEXT: fcvt s2, h1
833 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
834 ; CHECK-GI-NEXT: ldr h0, [sp, #174] // 2-byte Folded Reload
835 ; CHECK-GI-NEXT: fcvt s1, h0
836 ; CHECK-GI-NEXT: fmov s0, s2
837 ; CHECK-GI-NEXT: bl fmodf
838 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #32] // 32-byte Folded Reload
839 ; CHECK-GI-NEXT: fcvt h0, s0
840 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #144] // 16-byte Folded Reload
841 ; CHECK-GI-NEXT: ldr x30, [sp, #160] // 8-byte Folded Reload
842 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #128] // 16-byte Folded Reload
843 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
844 ; CHECK-GI-NEXT: ldr q2, [sp, #16] // 16-byte Folded Reload
845 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #112] // 16-byte Folded Reload
846 ; CHECK-GI-NEXT: ldp d15, d14, [sp, #96] // 16-byte Folded Reload
847 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
848 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
849 ; CHECK-GI-NEXT: mov v1.h[3], v2.h[0]
850 ; CHECK-GI-NEXT: ldr q2, [sp, #64] // 16-byte Folded Reload
851 ; CHECK-GI-NEXT: mov v1.h[4], v2.h[0]
852 ; CHECK-GI-NEXT: ldr q2, [sp, #80] // 16-byte Folded Reload
853 ; CHECK-GI-NEXT: mov v1.h[5], v2.h[0]
854 ; CHECK-GI-NEXT: mov v1.h[6], v0.h[0]
855 ; CHECK-GI-NEXT: mov v1.h[7], v0.h[0]
856 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
857 ; CHECK-GI-NEXT: add sp, sp, #176
860 %c = frem <7 x half> %a, %b
864 define <4 x half> @frem_v4f16(<4 x half> %a, <4 x half> %b) {
865 ; CHECK-SD-LABEL: frem_v4f16:
866 ; CHECK-SD: // %bb.0: // %entry
867 ; CHECK-SD-NEXT: sub sp, sp, #64
868 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
869 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
870 ; CHECK-SD-NEXT: .cfi_offset w30, -16
871 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 def $q1
872 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
873 ; CHECK-SD-NEXT: mov h3, v0.h[1]
874 ; CHECK-SD-NEXT: mov h2, v1.h[1]
875 ; CHECK-SD-NEXT: stp q0, q1, [sp, #16] // 32-byte Folded Spill
876 ; CHECK-SD-NEXT: fcvt s0, h3
877 ; CHECK-SD-NEXT: fcvt s1, h2
878 ; CHECK-SD-NEXT: bl fmodf
879 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
880 ; CHECK-SD-NEXT: fcvt h0, s0
881 ; CHECK-SD-NEXT: fcvt s2, h1
882 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
883 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
884 ; CHECK-SD-NEXT: fcvt s1, h0
885 ; CHECK-SD-NEXT: fmov s0, s2
886 ; CHECK-SD-NEXT: bl fmodf
887 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
888 ; CHECK-SD-NEXT: fcvt h3, s0
889 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
890 ; CHECK-SD-NEXT: mov h1, v1.h[2]
891 ; CHECK-SD-NEXT: mov h2, v0.h[2]
892 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
893 ; CHECK-SD-NEXT: mov v3.h[1], v0.h[0]
894 ; CHECK-SD-NEXT: fcvt s0, h1
895 ; CHECK-SD-NEXT: fcvt s1, h2
896 ; CHECK-SD-NEXT: str q3, [sp] // 16-byte Folded Spill
897 ; CHECK-SD-NEXT: bl fmodf
898 ; CHECK-SD-NEXT: ldp q1, q2, [sp, #16] // 32-byte Folded Reload
899 ; CHECK-SD-NEXT: fcvt h0, s0
900 ; CHECK-SD-NEXT: ldr q3, [sp] // 16-byte Folded Reload
901 ; CHECK-SD-NEXT: mov h1, v1.h[3]
902 ; CHECK-SD-NEXT: mov h2, v2.h[3]
903 ; CHECK-SD-NEXT: mov v3.h[2], v0.h[0]
904 ; CHECK-SD-NEXT: fcvt s0, h1
905 ; CHECK-SD-NEXT: fcvt s1, h2
906 ; CHECK-SD-NEXT: str q3, [sp] // 16-byte Folded Spill
907 ; CHECK-SD-NEXT: bl fmodf
908 ; CHECK-SD-NEXT: fcvt h1, s0
909 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
910 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
911 ; CHECK-SD-NEXT: mov v0.h[3], v1.h[0]
912 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
913 ; CHECK-SD-NEXT: add sp, sp, #64
916 ; CHECK-GI-LABEL: frem_v4f16:
917 ; CHECK-GI: // %bb.0: // %entry
918 ; CHECK-GI-NEXT: sub sp, sp, #112
919 ; CHECK-GI-NEXT: stp d13, d12, [sp, #48] // 16-byte Folded Spill
920 ; CHECK-GI-NEXT: stp d11, d10, [sp, #64] // 16-byte Folded Spill
921 ; CHECK-GI-NEXT: stp d9, d8, [sp, #80] // 16-byte Folded Spill
922 ; CHECK-GI-NEXT: str x30, [sp, #96] // 8-byte Folded Spill
923 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 112
924 ; CHECK-GI-NEXT: .cfi_offset w30, -16
925 ; CHECK-GI-NEXT: .cfi_offset b8, -24
926 ; CHECK-GI-NEXT: .cfi_offset b9, -32
927 ; CHECK-GI-NEXT: .cfi_offset b10, -40
928 ; CHECK-GI-NEXT: .cfi_offset b11, -48
929 ; CHECK-GI-NEXT: .cfi_offset b12, -56
930 ; CHECK-GI-NEXT: .cfi_offset b13, -64
931 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
932 ; CHECK-GI-NEXT: // kill: def $d1 killed $d1 def $q1
933 ; CHECK-GI-NEXT: mov h8, v0.h[1]
934 ; CHECK-GI-NEXT: mov h9, v0.h[2]
935 ; CHECK-GI-NEXT: mov h10, v0.h[3]
936 ; CHECK-GI-NEXT: mov h11, v1.h[1]
937 ; CHECK-GI-NEXT: mov h12, v1.h[2]
938 ; CHECK-GI-NEXT: mov h13, v1.h[3]
939 ; CHECK-GI-NEXT: fcvt s0, h0
940 ; CHECK-GI-NEXT: fcvt s1, h1
941 ; CHECK-GI-NEXT: bl fmodf
942 ; CHECK-GI-NEXT: fcvt s2, h8
943 ; CHECK-GI-NEXT: fcvt h0, s0
944 ; CHECK-GI-NEXT: fcvt s1, h11
945 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
946 ; CHECK-GI-NEXT: fmov s0, s2
947 ; CHECK-GI-NEXT: bl fmodf
948 ; CHECK-GI-NEXT: fcvt s2, h9
949 ; CHECK-GI-NEXT: fcvt h0, s0
950 ; CHECK-GI-NEXT: fcvt s1, h12
951 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
952 ; CHECK-GI-NEXT: fmov s0, s2
953 ; CHECK-GI-NEXT: bl fmodf
954 ; CHECK-GI-NEXT: fcvt s2, h10
955 ; CHECK-GI-NEXT: fcvt h0, s0
956 ; CHECK-GI-NEXT: fcvt s1, h13
957 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
958 ; CHECK-GI-NEXT: fmov s0, s2
959 ; CHECK-GI-NEXT: bl fmodf
960 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #16] // 32-byte Folded Reload
961 ; CHECK-GI-NEXT: fcvt h0, s0
962 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #80] // 16-byte Folded Reload
963 ; CHECK-GI-NEXT: ldr x30, [sp, #96] // 8-byte Folded Reload
964 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #64] // 16-byte Folded Reload
965 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
966 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
967 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #48] // 16-byte Folded Reload
968 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
969 ; CHECK-GI-NEXT: mov v1.h[3], v0.h[0]
970 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
971 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
972 ; CHECK-GI-NEXT: add sp, sp, #112
975 %c = frem <4 x half> %a, %b
979 define <8 x half> @frem_v8f16(<8 x half> %a, <8 x half> %b) {
980 ; CHECK-SD-LABEL: frem_v8f16:
981 ; CHECK-SD: // %bb.0: // %entry
982 ; CHECK-SD-NEXT: sub sp, sp, #64
983 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
984 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
985 ; CHECK-SD-NEXT: .cfi_offset w30, -16
986 ; CHECK-SD-NEXT: mov h3, v0.h[1]
987 ; CHECK-SD-NEXT: mov h2, v1.h[1]
988 ; CHECK-SD-NEXT: stp q0, q1, [sp] // 32-byte Folded Spill
989 ; CHECK-SD-NEXT: fcvt s0, h3
990 ; CHECK-SD-NEXT: fcvt s1, h2
991 ; CHECK-SD-NEXT: bl fmodf
992 ; CHECK-SD-NEXT: fcvt h0, s0
993 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
994 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
995 ; CHECK-SD-NEXT: fcvt s0, h0
996 ; CHECK-SD-NEXT: fcvt s1, h1
997 ; CHECK-SD-NEXT: bl fmodf
998 ; CHECK-SD-NEXT: fcvt h0, s0
999 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1000 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
1001 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1002 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
1003 ; CHECK-SD-NEXT: mov h0, v0.h[2]
1004 ; CHECK-SD-NEXT: mov h1, v1.h[2]
1005 ; CHECK-SD-NEXT: fcvt s0, h0
1006 ; CHECK-SD-NEXT: fcvt s1, h1
1007 ; CHECK-SD-NEXT: bl fmodf
1008 ; CHECK-SD-NEXT: fcvt h0, s0
1009 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1010 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
1011 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1012 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
1013 ; CHECK-SD-NEXT: mov h0, v0.h[3]
1014 ; CHECK-SD-NEXT: mov h1, v1.h[3]
1015 ; CHECK-SD-NEXT: fcvt s0, h0
1016 ; CHECK-SD-NEXT: fcvt s1, h1
1017 ; CHECK-SD-NEXT: bl fmodf
1018 ; CHECK-SD-NEXT: fcvt h0, s0
1019 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1020 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
1021 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1022 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
1023 ; CHECK-SD-NEXT: mov h0, v0.h[4]
1024 ; CHECK-SD-NEXT: mov h1, v1.h[4]
1025 ; CHECK-SD-NEXT: fcvt s0, h0
1026 ; CHECK-SD-NEXT: fcvt s1, h1
1027 ; CHECK-SD-NEXT: bl fmodf
1028 ; CHECK-SD-NEXT: fcvt h0, s0
1029 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1030 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
1031 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1032 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
1033 ; CHECK-SD-NEXT: mov h0, v0.h[5]
1034 ; CHECK-SD-NEXT: mov h1, v1.h[5]
1035 ; CHECK-SD-NEXT: fcvt s0, h0
1036 ; CHECK-SD-NEXT: fcvt s1, h1
1037 ; CHECK-SD-NEXT: bl fmodf
1038 ; CHECK-SD-NEXT: fcvt h0, s0
1039 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1040 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
1041 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1042 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
1043 ; CHECK-SD-NEXT: mov h0, v0.h[6]
1044 ; CHECK-SD-NEXT: mov h1, v1.h[6]
1045 ; CHECK-SD-NEXT: fcvt s0, h0
1046 ; CHECK-SD-NEXT: fcvt s1, h1
1047 ; CHECK-SD-NEXT: bl fmodf
1048 ; CHECK-SD-NEXT: fcvt h0, s0
1049 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1050 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
1051 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1052 ; CHECK-SD-NEXT: ldp q0, q1, [sp] // 32-byte Folded Reload
1053 ; CHECK-SD-NEXT: mov h0, v0.h[7]
1054 ; CHECK-SD-NEXT: mov h1, v1.h[7]
1055 ; CHECK-SD-NEXT: fcvt s0, h0
1056 ; CHECK-SD-NEXT: fcvt s1, h1
1057 ; CHECK-SD-NEXT: bl fmodf
1058 ; CHECK-SD-NEXT: fcvt h1, s0
1059 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
1060 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
1061 ; CHECK-SD-NEXT: mov v0.h[7], v1.h[0]
1062 ; CHECK-SD-NEXT: add sp, sp, #64
1063 ; CHECK-SD-NEXT: ret
1065 ; CHECK-GI-LABEL: frem_v8f16:
1066 ; CHECK-GI: // %bb.0: // %entry
1067 ; CHECK-GI-NEXT: sub sp, sp, #192
1068 ; CHECK-GI-NEXT: stp d15, d14, [sp, #112] // 16-byte Folded Spill
1069 ; CHECK-GI-NEXT: stp d13, d12, [sp, #128] // 16-byte Folded Spill
1070 ; CHECK-GI-NEXT: stp d11, d10, [sp, #144] // 16-byte Folded Spill
1071 ; CHECK-GI-NEXT: stp d9, d8, [sp, #160] // 16-byte Folded Spill
1072 ; CHECK-GI-NEXT: str x30, [sp, #176] // 8-byte Folded Spill
1073 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 192
1074 ; CHECK-GI-NEXT: .cfi_offset w30, -16
1075 ; CHECK-GI-NEXT: .cfi_offset b8, -24
1076 ; CHECK-GI-NEXT: .cfi_offset b9, -32
1077 ; CHECK-GI-NEXT: .cfi_offset b10, -40
1078 ; CHECK-GI-NEXT: .cfi_offset b11, -48
1079 ; CHECK-GI-NEXT: .cfi_offset b12, -56
1080 ; CHECK-GI-NEXT: .cfi_offset b13, -64
1081 ; CHECK-GI-NEXT: .cfi_offset b14, -72
1082 ; CHECK-GI-NEXT: .cfi_offset b15, -80
1083 ; CHECK-GI-NEXT: mov h2, v0.h[5]
1084 ; CHECK-GI-NEXT: mov h10, v0.h[1]
1085 ; CHECK-GI-NEXT: mov h11, v0.h[2]
1086 ; CHECK-GI-NEXT: mov h12, v0.h[3]
1087 ; CHECK-GI-NEXT: mov h13, v0.h[4]
1088 ; CHECK-GI-NEXT: mov h8, v1.h[1]
1089 ; CHECK-GI-NEXT: mov h9, v1.h[2]
1090 ; CHECK-GI-NEXT: mov h15, v1.h[3]
1091 ; CHECK-GI-NEXT: mov h14, v1.h[4]
1092 ; CHECK-GI-NEXT: str h2, [sp, #48] // 2-byte Folded Spill
1093 ; CHECK-GI-NEXT: mov h2, v0.h[6]
1094 ; CHECK-GI-NEXT: str h2, [sp, #80] // 2-byte Folded Spill
1095 ; CHECK-GI-NEXT: mov h2, v0.h[7]
1096 ; CHECK-GI-NEXT: fcvt s0, h0
1097 ; CHECK-GI-NEXT: str h2, [sp, #96] // 2-byte Folded Spill
1098 ; CHECK-GI-NEXT: mov h2, v1.h[5]
1099 ; CHECK-GI-NEXT: str h2, [sp, #186] // 2-byte Folded Spill
1100 ; CHECK-GI-NEXT: mov h2, v1.h[6]
1101 ; CHECK-GI-NEXT: str h2, [sp, #188] // 2-byte Folded Spill
1102 ; CHECK-GI-NEXT: mov h2, v1.h[7]
1103 ; CHECK-GI-NEXT: fcvt s1, h1
1104 ; CHECK-GI-NEXT: str h2, [sp, #190] // 2-byte Folded Spill
1105 ; CHECK-GI-NEXT: bl fmodf
1106 ; CHECK-GI-NEXT: fcvt s2, h10
1107 ; CHECK-GI-NEXT: fcvt h0, s0
1108 ; CHECK-GI-NEXT: fcvt s1, h8
1109 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
1110 ; CHECK-GI-NEXT: fmov s0, s2
1111 ; CHECK-GI-NEXT: bl fmodf
1112 ; CHECK-GI-NEXT: fcvt s2, h11
1113 ; CHECK-GI-NEXT: fcvt h0, s0
1114 ; CHECK-GI-NEXT: fcvt s1, h9
1115 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1116 ; CHECK-GI-NEXT: fmov s0, s2
1117 ; CHECK-GI-NEXT: bl fmodf
1118 ; CHECK-GI-NEXT: fcvt s2, h12
1119 ; CHECK-GI-NEXT: fcvt h0, s0
1120 ; CHECK-GI-NEXT: fcvt s1, h15
1121 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1122 ; CHECK-GI-NEXT: fmov s0, s2
1123 ; CHECK-GI-NEXT: bl fmodf
1124 ; CHECK-GI-NEXT: fcvt s2, h13
1125 ; CHECK-GI-NEXT: fcvt h0, s0
1126 ; CHECK-GI-NEXT: fcvt s1, h14
1127 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
1128 ; CHECK-GI-NEXT: fmov s0, s2
1129 ; CHECK-GI-NEXT: bl fmodf
1130 ; CHECK-GI-NEXT: ldr h1, [sp, #48] // 2-byte Folded Reload
1131 ; CHECK-GI-NEXT: fcvt h0, s0
1132 ; CHECK-GI-NEXT: fcvt s2, h1
1133 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
1134 ; CHECK-GI-NEXT: ldr h0, [sp, #186] // 2-byte Folded Reload
1135 ; CHECK-GI-NEXT: fcvt s1, h0
1136 ; CHECK-GI-NEXT: fmov s0, s2
1137 ; CHECK-GI-NEXT: bl fmodf
1138 ; CHECK-GI-NEXT: ldr h1, [sp, #80] // 2-byte Folded Reload
1139 ; CHECK-GI-NEXT: fcvt h0, s0
1140 ; CHECK-GI-NEXT: fcvt s2, h1
1141 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
1142 ; CHECK-GI-NEXT: ldr h0, [sp, #188] // 2-byte Folded Reload
1143 ; CHECK-GI-NEXT: fcvt s1, h0
1144 ; CHECK-GI-NEXT: fmov s0, s2
1145 ; CHECK-GI-NEXT: bl fmodf
1146 ; CHECK-GI-NEXT: ldr h1, [sp, #96] // 2-byte Folded Reload
1147 ; CHECK-GI-NEXT: fcvt h0, s0
1148 ; CHECK-GI-NEXT: fcvt s2, h1
1149 ; CHECK-GI-NEXT: str q0, [sp, #96] // 16-byte Folded Spill
1150 ; CHECK-GI-NEXT: ldr h0, [sp, #190] // 2-byte Folded Reload
1151 ; CHECK-GI-NEXT: fcvt s1, h0
1152 ; CHECK-GI-NEXT: fmov s0, s2
1153 ; CHECK-GI-NEXT: bl fmodf
1154 ; CHECK-GI-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
1155 ; CHECK-GI-NEXT: ldr q2, [sp, #32] // 16-byte Folded Reload
1156 ; CHECK-GI-NEXT: fcvt h0, s0
1157 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #160] // 16-byte Folded Reload
1158 ; CHECK-GI-NEXT: ldr x30, [sp, #176] // 8-byte Folded Reload
1159 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
1160 ; CHECK-GI-NEXT: ldr q2, [sp, #16] // 16-byte Folded Reload
1161 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #144] // 16-byte Folded Reload
1162 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #128] // 16-byte Folded Reload
1163 ; CHECK-GI-NEXT: ldp d15, d14, [sp, #112] // 16-byte Folded Reload
1164 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
1165 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
1166 ; CHECK-GI-NEXT: mov v1.h[3], v2.h[0]
1167 ; CHECK-GI-NEXT: ldr q2, [sp, #48] // 16-byte Folded Reload
1168 ; CHECK-GI-NEXT: mov v1.h[4], v2.h[0]
1169 ; CHECK-GI-NEXT: ldr q2, [sp, #80] // 16-byte Folded Reload
1170 ; CHECK-GI-NEXT: mov v1.h[5], v2.h[0]
1171 ; CHECK-GI-NEXT: ldr q2, [sp, #96] // 16-byte Folded Reload
1172 ; CHECK-GI-NEXT: mov v1.h[6], v2.h[0]
1173 ; CHECK-GI-NEXT: mov v1.h[7], v0.h[0]
1174 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
1175 ; CHECK-GI-NEXT: add sp, sp, #192
1176 ; CHECK-GI-NEXT: ret
1178 %c = frem <8 x half> %a, %b
1182 define <16 x half> @frem_v16f16(<16 x half> %a, <16 x half> %b) {
1183 ; CHECK-SD-LABEL: frem_v16f16:
1184 ; CHECK-SD: // %bb.0: // %entry
1185 ; CHECK-SD-NEXT: sub sp, sp, #96
1186 ; CHECK-SD-NEXT: str x30, [sp, #80] // 8-byte Folded Spill
1187 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 96
1188 ; CHECK-SD-NEXT: .cfi_offset w30, -16
1189 ; CHECK-SD-NEXT: stp q0, q1, [sp] // 32-byte Folded Spill
1190 ; CHECK-SD-NEXT: mov h1, v2.h[1]
1191 ; CHECK-SD-NEXT: stp q3, q2, [sp, #32] // 32-byte Folded Spill
1192 ; CHECK-SD-NEXT: mov h3, v0.h[1]
1193 ; CHECK-SD-NEXT: fcvt s1, h1
1194 ; CHECK-SD-NEXT: fcvt s0, h3
1195 ; CHECK-SD-NEXT: bl fmodf
1196 ; CHECK-SD-NEXT: fcvt h0, s0
1197 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1198 ; CHECK-SD-NEXT: fcvt s1, h1
1199 ; CHECK-SD-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
1200 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1201 ; CHECK-SD-NEXT: fcvt s0, h0
1202 ; CHECK-SD-NEXT: bl fmodf
1203 ; CHECK-SD-NEXT: fcvt h0, s0
1204 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
1205 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
1206 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1207 ; CHECK-SD-NEXT: mov h1, v1.h[2]
1208 ; CHECK-SD-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
1209 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1210 ; CHECK-SD-NEXT: mov h0, v0.h[2]
1211 ; CHECK-SD-NEXT: fcvt s1, h1
1212 ; CHECK-SD-NEXT: fcvt s0, h0
1213 ; CHECK-SD-NEXT: bl fmodf
1214 ; CHECK-SD-NEXT: fcvt h0, s0
1215 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
1216 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
1217 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1218 ; CHECK-SD-NEXT: mov h0, v0.h[3]
1219 ; CHECK-SD-NEXT: str q1, [sp, #64] // 16-byte Folded Spill
1220 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1221 ; CHECK-SD-NEXT: mov h1, v1.h[3]
1222 ; CHECK-SD-NEXT: fcvt s0, h0
1223 ; CHECK-SD-NEXT: fcvt s1, h1
1224 ; CHECK-SD-NEXT: bl fmodf
1225 ; CHECK-SD-NEXT: fcvt h0, s0
1226 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
1227 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
1228 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1229 ; CHECK-SD-NEXT: mov h0, v0.h[4]
1230 ; CHECK-SD-NEXT: str q1, [sp, #64] // 16-byte Folded Spill
1231 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1232 ; CHECK-SD-NEXT: mov h1, v1.h[4]
1233 ; CHECK-SD-NEXT: fcvt s0, h0
1234 ; CHECK-SD-NEXT: fcvt s1, h1
1235 ; CHECK-SD-NEXT: bl fmodf
1236 ; CHECK-SD-NEXT: fcvt h0, s0
1237 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
1238 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
1239 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1240 ; CHECK-SD-NEXT: mov h0, v0.h[5]
1241 ; CHECK-SD-NEXT: str q1, [sp, #64] // 16-byte Folded Spill
1242 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1243 ; CHECK-SD-NEXT: mov h1, v1.h[5]
1244 ; CHECK-SD-NEXT: fcvt s0, h0
1245 ; CHECK-SD-NEXT: fcvt s1, h1
1246 ; CHECK-SD-NEXT: bl fmodf
1247 ; CHECK-SD-NEXT: fcvt h0, s0
1248 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
1249 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
1250 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1251 ; CHECK-SD-NEXT: mov h0, v0.h[6]
1252 ; CHECK-SD-NEXT: str q1, [sp, #64] // 16-byte Folded Spill
1253 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1254 ; CHECK-SD-NEXT: mov h1, v1.h[6]
1255 ; CHECK-SD-NEXT: fcvt s0, h0
1256 ; CHECK-SD-NEXT: fcvt s1, h1
1257 ; CHECK-SD-NEXT: bl fmodf
1258 ; CHECK-SD-NEXT: fcvt h0, s0
1259 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
1260 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
1261 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1262 ; CHECK-SD-NEXT: mov h0, v0.h[7]
1263 ; CHECK-SD-NEXT: str q1, [sp, #64] // 16-byte Folded Spill
1264 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1265 ; CHECK-SD-NEXT: mov h1, v1.h[7]
1266 ; CHECK-SD-NEXT: fcvt s0, h0
1267 ; CHECK-SD-NEXT: fcvt s1, h1
1268 ; CHECK-SD-NEXT: bl fmodf
1269 ; CHECK-SD-NEXT: fcvt h0, s0
1270 ; CHECK-SD-NEXT: ldr q1, [sp, #64] // 16-byte Folded Reload
1271 ; CHECK-SD-NEXT: mov v1.h[7], v0.h[0]
1272 ; CHECK-SD-NEXT: str q1, [sp, #64] // 16-byte Folded Spill
1273 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
1274 ; CHECK-SD-NEXT: mov h0, v0.h[1]
1275 ; CHECK-SD-NEXT: mov h1, v1.h[1]
1276 ; CHECK-SD-NEXT: fcvt s0, h0
1277 ; CHECK-SD-NEXT: fcvt s1, h1
1278 ; CHECK-SD-NEXT: bl fmodf
1279 ; CHECK-SD-NEXT: fcvt h0, s0
1280 ; CHECK-SD-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
1281 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
1282 ; CHECK-SD-NEXT: fcvt s0, h0
1283 ; CHECK-SD-NEXT: fcvt s1, h1
1284 ; CHECK-SD-NEXT: bl fmodf
1285 ; CHECK-SD-NEXT: fcvt h0, s0
1286 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1287 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
1288 ; CHECK-SD-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
1289 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
1290 ; CHECK-SD-NEXT: mov h0, v0.h[2]
1291 ; CHECK-SD-NEXT: mov h1, v1.h[2]
1292 ; CHECK-SD-NEXT: fcvt s0, h0
1293 ; CHECK-SD-NEXT: fcvt s1, h1
1294 ; CHECK-SD-NEXT: bl fmodf
1295 ; CHECK-SD-NEXT: fcvt h0, s0
1296 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1297 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
1298 ; CHECK-SD-NEXT: str q1, [sp, #48] // 16-byte Folded Spill
1299 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
1300 ; CHECK-SD-NEXT: mov h0, v0.h[3]
1301 ; CHECK-SD-NEXT: mov h1, v1.h[3]
1302 ; CHECK-SD-NEXT: fcvt s0, h0
1303 ; CHECK-SD-NEXT: fcvt s1, h1
1304 ; CHECK-SD-NEXT: bl fmodf
1305 ; CHECK-SD-NEXT: fcvt h0, s0
1306 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1307 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
1308 ; CHECK-SD-NEXT: str q1, [sp, #48] // 16-byte Folded Spill
1309 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
1310 ; CHECK-SD-NEXT: mov h0, v0.h[4]
1311 ; CHECK-SD-NEXT: mov h1, v1.h[4]
1312 ; CHECK-SD-NEXT: fcvt s0, h0
1313 ; CHECK-SD-NEXT: fcvt s1, h1
1314 ; CHECK-SD-NEXT: bl fmodf
1315 ; CHECK-SD-NEXT: fcvt h0, s0
1316 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1317 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
1318 ; CHECK-SD-NEXT: str q1, [sp, #48] // 16-byte Folded Spill
1319 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
1320 ; CHECK-SD-NEXT: mov h0, v0.h[5]
1321 ; CHECK-SD-NEXT: mov h1, v1.h[5]
1322 ; CHECK-SD-NEXT: fcvt s0, h0
1323 ; CHECK-SD-NEXT: fcvt s1, h1
1324 ; CHECK-SD-NEXT: bl fmodf
1325 ; CHECK-SD-NEXT: fcvt h0, s0
1326 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1327 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
1328 ; CHECK-SD-NEXT: str q1, [sp, #48] // 16-byte Folded Spill
1329 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
1330 ; CHECK-SD-NEXT: mov h0, v0.h[6]
1331 ; CHECK-SD-NEXT: mov h1, v1.h[6]
1332 ; CHECK-SD-NEXT: fcvt s0, h0
1333 ; CHECK-SD-NEXT: fcvt s1, h1
1334 ; CHECK-SD-NEXT: bl fmodf
1335 ; CHECK-SD-NEXT: fcvt h0, s0
1336 ; CHECK-SD-NEXT: ldr q1, [sp, #48] // 16-byte Folded Reload
1337 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
1338 ; CHECK-SD-NEXT: str q1, [sp, #48] // 16-byte Folded Spill
1339 ; CHECK-SD-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
1340 ; CHECK-SD-NEXT: mov h0, v0.h[7]
1341 ; CHECK-SD-NEXT: mov h1, v1.h[7]
1342 ; CHECK-SD-NEXT: fcvt s0, h0
1343 ; CHECK-SD-NEXT: fcvt s1, h1
1344 ; CHECK-SD-NEXT: bl fmodf
1345 ; CHECK-SD-NEXT: fmov s1, s0
1346 ; CHECK-SD-NEXT: ldr x30, [sp, #80] // 8-byte Folded Reload
1347 ; CHECK-SD-NEXT: fcvt h2, s1
1348 ; CHECK-SD-NEXT: ldp q1, q0, [sp, #48] // 32-byte Folded Reload
1349 ; CHECK-SD-NEXT: mov v1.h[7], v2.h[0]
1350 ; CHECK-SD-NEXT: add sp, sp, #96
1351 ; CHECK-SD-NEXT: ret
1353 ; CHECK-GI-LABEL: frem_v16f16:
1354 ; CHECK-GI: // %bb.0: // %entry
1355 ; CHECK-GI-NEXT: sub sp, sp, #448
1356 ; CHECK-GI-NEXT: stp d15, d14, [sp, #368] // 16-byte Folded Spill
1357 ; CHECK-GI-NEXT: stp d13, d12, [sp, #384] // 16-byte Folded Spill
1358 ; CHECK-GI-NEXT: stp d11, d10, [sp, #400] // 16-byte Folded Spill
1359 ; CHECK-GI-NEXT: stp d9, d8, [sp, #416] // 16-byte Folded Spill
1360 ; CHECK-GI-NEXT: stp x29, x30, [sp, #432] // 16-byte Folded Spill
1361 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 448
1362 ; CHECK-GI-NEXT: .cfi_offset w30, -8
1363 ; CHECK-GI-NEXT: .cfi_offset w29, -16
1364 ; CHECK-GI-NEXT: .cfi_offset b8, -24
1365 ; CHECK-GI-NEXT: .cfi_offset b9, -32
1366 ; CHECK-GI-NEXT: .cfi_offset b10, -40
1367 ; CHECK-GI-NEXT: .cfi_offset b11, -48
1368 ; CHECK-GI-NEXT: .cfi_offset b12, -56
1369 ; CHECK-GI-NEXT: .cfi_offset b13, -64
1370 ; CHECK-GI-NEXT: .cfi_offset b14, -72
1371 ; CHECK-GI-NEXT: .cfi_offset b15, -80
1372 ; CHECK-GI-NEXT: mov h4, v0.h[4]
1373 ; CHECK-GI-NEXT: str q1, [sp, #112] // 16-byte Folded Spill
1374 ; CHECK-GI-NEXT: mov h11, v0.h[1]
1375 ; CHECK-GI-NEXT: mov h12, v0.h[2]
1376 ; CHECK-GI-NEXT: mov h13, v0.h[3]
1377 ; CHECK-GI-NEXT: str q3, [sp, #16] // 16-byte Folded Spill
1378 ; CHECK-GI-NEXT: mov h15, v2.h[1]
1379 ; CHECK-GI-NEXT: mov h8, v2.h[2]
1380 ; CHECK-GI-NEXT: mov h9, v2.h[3]
1381 ; CHECK-GI-NEXT: mov h10, v2.h[4]
1382 ; CHECK-GI-NEXT: mov h14, v2.h[5]
1383 ; CHECK-GI-NEXT: str h4, [sp, #288] // 2-byte Folded Spill
1384 ; CHECK-GI-NEXT: mov h4, v0.h[5]
1385 ; CHECK-GI-NEXT: str h4, [sp, #240] // 2-byte Folded Spill
1386 ; CHECK-GI-NEXT: mov h4, v0.h[6]
1387 ; CHECK-GI-NEXT: str h4, [sp, #176] // 2-byte Folded Spill
1388 ; CHECK-GI-NEXT: mov h4, v0.h[7]
1389 ; CHECK-GI-NEXT: fcvt s0, h0
1390 ; CHECK-GI-NEXT: str h4, [sp, #144] // 2-byte Folded Spill
1391 ; CHECK-GI-NEXT: mov v4.16b, v1.16b
1392 ; CHECK-GI-NEXT: mov h1, v1.h[1]
1393 ; CHECK-GI-NEXT: str h1, [sp, #48] // 2-byte Folded Spill
1394 ; CHECK-GI-NEXT: mov h1, v4.h[2]
1395 ; CHECK-GI-NEXT: str h1, [sp, #80] // 2-byte Folded Spill
1396 ; CHECK-GI-NEXT: mov h1, v4.h[3]
1397 ; CHECK-GI-NEXT: str h1, [sp, #128] // 2-byte Folded Spill
1398 ; CHECK-GI-NEXT: mov h1, v4.h[4]
1399 ; CHECK-GI-NEXT: str h1, [sp, #192] // 2-byte Folded Spill
1400 ; CHECK-GI-NEXT: mov h1, v4.h[5]
1401 ; CHECK-GI-NEXT: str h1, [sp, #256] // 2-byte Folded Spill
1402 ; CHECK-GI-NEXT: mov h1, v4.h[6]
1403 ; CHECK-GI-NEXT: str h1, [sp, #320] // 2-byte Folded Spill
1404 ; CHECK-GI-NEXT: mov h1, v4.h[7]
1405 ; CHECK-GI-NEXT: str h1, [sp, #352] // 2-byte Folded Spill
1406 ; CHECK-GI-NEXT: mov h1, v2.h[6]
1407 ; CHECK-GI-NEXT: str h1, [sp, #12] // 2-byte Folded Spill
1408 ; CHECK-GI-NEXT: mov h1, v2.h[7]
1409 ; CHECK-GI-NEXT: str h1, [sp, #14] // 2-byte Folded Spill
1410 ; CHECK-GI-NEXT: mov h1, v3.h[1]
1411 ; CHECK-GI-NEXT: str h1, [sp, #44] // 2-byte Folded Spill
1412 ; CHECK-GI-NEXT: mov h1, v3.h[2]
1413 ; CHECK-GI-NEXT: str h1, [sp, #46] // 2-byte Folded Spill
1414 ; CHECK-GI-NEXT: mov h1, v3.h[3]
1415 ; CHECK-GI-NEXT: str h1, [sp, #78] // 2-byte Folded Spill
1416 ; CHECK-GI-NEXT: mov h1, v3.h[4]
1417 ; CHECK-GI-NEXT: str h1, [sp, #110] // 2-byte Folded Spill
1418 ; CHECK-GI-NEXT: mov h1, v3.h[5]
1419 ; CHECK-GI-NEXT: str h1, [sp, #174] // 2-byte Folded Spill
1420 ; CHECK-GI-NEXT: mov h1, v3.h[6]
1421 ; CHECK-GI-NEXT: str h1, [sp, #222] // 2-byte Folded Spill
1422 ; CHECK-GI-NEXT: mov h1, v3.h[7]
1423 ; CHECK-GI-NEXT: str h1, [sp, #286] // 2-byte Folded Spill
1424 ; CHECK-GI-NEXT: fcvt s1, h2
1425 ; CHECK-GI-NEXT: bl fmodf
1426 ; CHECK-GI-NEXT: fcvt s2, h11
1427 ; CHECK-GI-NEXT: fcvt h0, s0
1428 ; CHECK-GI-NEXT: fcvt s1, h15
1429 ; CHECK-GI-NEXT: str q0, [sp, #304] // 16-byte Folded Spill
1430 ; CHECK-GI-NEXT: fmov s0, s2
1431 ; CHECK-GI-NEXT: bl fmodf
1432 ; CHECK-GI-NEXT: fcvt s2, h12
1433 ; CHECK-GI-NEXT: fcvt h0, s0
1434 ; CHECK-GI-NEXT: fcvt s1, h8
1435 ; CHECK-GI-NEXT: str q0, [sp, #224] // 16-byte Folded Spill
1436 ; CHECK-GI-NEXT: fmov s0, s2
1437 ; CHECK-GI-NEXT: bl fmodf
1438 ; CHECK-GI-NEXT: fcvt s2, h13
1439 ; CHECK-GI-NEXT: fcvt h0, s0
1440 ; CHECK-GI-NEXT: fcvt s1, h9
1441 ; CHECK-GI-NEXT: str q0, [sp, #336] // 16-byte Folded Spill
1442 ; CHECK-GI-NEXT: fmov s0, s2
1443 ; CHECK-GI-NEXT: bl fmodf
1444 ; CHECK-GI-NEXT: ldr h1, [sp, #288] // 2-byte Folded Reload
1445 ; CHECK-GI-NEXT: fcvt h0, s0
1446 ; CHECK-GI-NEXT: fcvt s2, h1
1447 ; CHECK-GI-NEXT: fcvt s1, h10
1448 ; CHECK-GI-NEXT: str q0, [sp, #288] // 16-byte Folded Spill
1449 ; CHECK-GI-NEXT: fmov s0, s2
1450 ; CHECK-GI-NEXT: bl fmodf
1451 ; CHECK-GI-NEXT: ldr h1, [sp, #240] // 2-byte Folded Reload
1452 ; CHECK-GI-NEXT: fcvt h0, s0
1453 ; CHECK-GI-NEXT: fcvt s2, h1
1454 ; CHECK-GI-NEXT: fcvt s1, h14
1455 ; CHECK-GI-NEXT: str q0, [sp, #240] // 16-byte Folded Spill
1456 ; CHECK-GI-NEXT: fmov s0, s2
1457 ; CHECK-GI-NEXT: bl fmodf
1458 ; CHECK-GI-NEXT: ldr h1, [sp, #176] // 2-byte Folded Reload
1459 ; CHECK-GI-NEXT: fcvt h0, s0
1460 ; CHECK-GI-NEXT: fcvt s2, h1
1461 ; CHECK-GI-NEXT: str q0, [sp, #176] // 16-byte Folded Spill
1462 ; CHECK-GI-NEXT: ldr h0, [sp, #12] // 2-byte Folded Reload
1463 ; CHECK-GI-NEXT: fcvt s1, h0
1464 ; CHECK-GI-NEXT: fmov s0, s2
1465 ; CHECK-GI-NEXT: bl fmodf
1466 ; CHECK-GI-NEXT: ldr h1, [sp, #144] // 2-byte Folded Reload
1467 ; CHECK-GI-NEXT: fcvt h0, s0
1468 ; CHECK-GI-NEXT: fcvt s2, h1
1469 ; CHECK-GI-NEXT: str q0, [sp, #144] // 16-byte Folded Spill
1470 ; CHECK-GI-NEXT: ldr h0, [sp, #14] // 2-byte Folded Reload
1471 ; CHECK-GI-NEXT: fcvt s1, h0
1472 ; CHECK-GI-NEXT: fmov s0, s2
1473 ; CHECK-GI-NEXT: bl fmodf
1474 ; CHECK-GI-NEXT: ldr q1, [sp, #112] // 16-byte Folded Reload
1475 ; CHECK-GI-NEXT: fcvt h0, s0
1476 ; CHECK-GI-NEXT: fcvt s2, h1
1477 ; CHECK-GI-NEXT: str q0, [sp, #112] // 16-byte Folded Spill
1478 ; CHECK-GI-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1479 ; CHECK-GI-NEXT: fcvt s1, h0
1480 ; CHECK-GI-NEXT: fmov s0, s2
1481 ; CHECK-GI-NEXT: bl fmodf
1482 ; CHECK-GI-NEXT: ldr h1, [sp, #48] // 2-byte Folded Reload
1483 ; CHECK-GI-NEXT: fcvt h0, s0
1484 ; CHECK-GI-NEXT: fcvt s2, h1
1485 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
1486 ; CHECK-GI-NEXT: ldr h0, [sp, #44] // 2-byte Folded Reload
1487 ; CHECK-GI-NEXT: fcvt s1, h0
1488 ; CHECK-GI-NEXT: fmov s0, s2
1489 ; CHECK-GI-NEXT: bl fmodf
1490 ; CHECK-GI-NEXT: ldr h1, [sp, #80] // 2-byte Folded Reload
1491 ; CHECK-GI-NEXT: fcvt h0, s0
1492 ; CHECK-GI-NEXT: fcvt s2, h1
1493 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
1494 ; CHECK-GI-NEXT: ldr h0, [sp, #46] // 2-byte Folded Reload
1495 ; CHECK-GI-NEXT: fcvt s1, h0
1496 ; CHECK-GI-NEXT: fmov s0, s2
1497 ; CHECK-GI-NEXT: bl fmodf
1498 ; CHECK-GI-NEXT: ldr h1, [sp, #128] // 2-byte Folded Reload
1499 ; CHECK-GI-NEXT: fcvt h0, s0
1500 ; CHECK-GI-NEXT: fcvt s2, h1
1501 ; CHECK-GI-NEXT: str q0, [sp, #128] // 16-byte Folded Spill
1502 ; CHECK-GI-NEXT: ldr h0, [sp, #78] // 2-byte Folded Reload
1503 ; CHECK-GI-NEXT: fcvt s1, h0
1504 ; CHECK-GI-NEXT: fmov s0, s2
1505 ; CHECK-GI-NEXT: bl fmodf
1506 ; CHECK-GI-NEXT: ldr h1, [sp, #192] // 2-byte Folded Reload
1507 ; CHECK-GI-NEXT: fcvt h0, s0
1508 ; CHECK-GI-NEXT: fcvt s2, h1
1509 ; CHECK-GI-NEXT: str q0, [sp, #192] // 16-byte Folded Spill
1510 ; CHECK-GI-NEXT: ldr h0, [sp, #110] // 2-byte Folded Reload
1511 ; CHECK-GI-NEXT: fcvt s1, h0
1512 ; CHECK-GI-NEXT: fmov s0, s2
1513 ; CHECK-GI-NEXT: bl fmodf
1514 ; CHECK-GI-NEXT: ldr h1, [sp, #256] // 2-byte Folded Reload
1515 ; CHECK-GI-NEXT: fcvt h0, s0
1516 ; CHECK-GI-NEXT: fcvt s2, h1
1517 ; CHECK-GI-NEXT: str q0, [sp, #256] // 16-byte Folded Spill
1518 ; CHECK-GI-NEXT: ldr h0, [sp, #174] // 2-byte Folded Reload
1519 ; CHECK-GI-NEXT: fcvt s1, h0
1520 ; CHECK-GI-NEXT: fmov s0, s2
1521 ; CHECK-GI-NEXT: bl fmodf
1522 ; CHECK-GI-NEXT: ldr h1, [sp, #320] // 2-byte Folded Reload
1523 ; CHECK-GI-NEXT: fcvt h0, s0
1524 ; CHECK-GI-NEXT: fcvt s2, h1
1525 ; CHECK-GI-NEXT: str q0, [sp, #320] // 16-byte Folded Spill
1526 ; CHECK-GI-NEXT: ldr h0, [sp, #222] // 2-byte Folded Reload
1527 ; CHECK-GI-NEXT: fcvt s1, h0
1528 ; CHECK-GI-NEXT: fmov s0, s2
1529 ; CHECK-GI-NEXT: bl fmodf
1530 ; CHECK-GI-NEXT: ldr h1, [sp, #352] // 2-byte Folded Reload
1531 ; CHECK-GI-NEXT: fcvt h0, s0
1532 ; CHECK-GI-NEXT: fcvt s2, h1
1533 ; CHECK-GI-NEXT: str q0, [sp, #352] // 16-byte Folded Spill
1534 ; CHECK-GI-NEXT: ldr h0, [sp, #286] // 2-byte Folded Reload
1535 ; CHECK-GI-NEXT: fcvt s1, h0
1536 ; CHECK-GI-NEXT: fmov s0, s2
1537 ; CHECK-GI-NEXT: bl fmodf
1538 ; CHECK-GI-NEXT: ldr q1, [sp, #304] // 16-byte Folded Reload
1539 ; CHECK-GI-NEXT: ldr q2, [sp, #224] // 16-byte Folded Reload
1540 ; CHECK-GI-NEXT: ldr q3, [sp, #48] // 16-byte Folded Reload
1541 ; CHECK-GI-NEXT: ldp x29, x30, [sp, #432] // 16-byte Folded Reload
1542 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
1543 ; CHECK-GI-NEXT: ldr q2, [sp, #80] // 16-byte Folded Reload
1544 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #416] // 16-byte Folded Reload
1545 ; CHECK-GI-NEXT: mov v3.h[1], v2.h[0]
1546 ; CHECK-GI-NEXT: ldr q2, [sp, #336] // 16-byte Folded Reload
1547 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #400] // 16-byte Folded Reload
1548 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
1549 ; CHECK-GI-NEXT: ldr q2, [sp, #128] // 16-byte Folded Reload
1550 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #384] // 16-byte Folded Reload
1551 ; CHECK-GI-NEXT: mov v3.h[2], v2.h[0]
1552 ; CHECK-GI-NEXT: ldr q2, [sp, #288] // 16-byte Folded Reload
1553 ; CHECK-GI-NEXT: ldp d15, d14, [sp, #368] // 16-byte Folded Reload
1554 ; CHECK-GI-NEXT: mov v1.h[3], v2.h[0]
1555 ; CHECK-GI-NEXT: ldr q2, [sp, #192] // 16-byte Folded Reload
1556 ; CHECK-GI-NEXT: mov v3.h[3], v2.h[0]
1557 ; CHECK-GI-NEXT: ldr q2, [sp, #240] // 16-byte Folded Reload
1558 ; CHECK-GI-NEXT: mov v1.h[4], v2.h[0]
1559 ; CHECK-GI-NEXT: ldr q2, [sp, #256] // 16-byte Folded Reload
1560 ; CHECK-GI-NEXT: mov v3.h[4], v2.h[0]
1561 ; CHECK-GI-NEXT: ldr q2, [sp, #176] // 16-byte Folded Reload
1562 ; CHECK-GI-NEXT: mov v1.h[5], v2.h[0]
1563 ; CHECK-GI-NEXT: ldr q2, [sp, #320] // 16-byte Folded Reload
1564 ; CHECK-GI-NEXT: mov v3.h[5], v2.h[0]
1565 ; CHECK-GI-NEXT: fcvt h2, s0
1566 ; CHECK-GI-NEXT: ldr q0, [sp, #144] // 16-byte Folded Reload
1567 ; CHECK-GI-NEXT: mov v1.h[6], v0.h[0]
1568 ; CHECK-GI-NEXT: ldr q0, [sp, #352] // 16-byte Folded Reload
1569 ; CHECK-GI-NEXT: mov v3.h[6], v0.h[0]
1570 ; CHECK-GI-NEXT: ldr q0, [sp, #112] // 16-byte Folded Reload
1571 ; CHECK-GI-NEXT: mov v1.h[7], v0.h[0]
1572 ; CHECK-GI-NEXT: mov v3.h[7], v2.h[0]
1573 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
1574 ; CHECK-GI-NEXT: mov v1.16b, v3.16b
1575 ; CHECK-GI-NEXT: add sp, sp, #448
1576 ; CHECK-GI-NEXT: ret
1578 %c = frem <16 x half> %a, %b