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