1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
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 -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI
5 define double @sin_f64(double %a) {
6 ; CHECK-SD-LABEL: sin_f64:
7 ; CHECK-SD: // %bb.0: // %entry
10 ; CHECK-GI-LABEL: sin_f64:
11 ; CHECK-GI: // %bb.0: // %entry
12 ; CHECK-GI-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
13 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 16
14 ; CHECK-GI-NEXT: .cfi_offset w30, -16
15 ; CHECK-GI-NEXT: bl sin
16 ; CHECK-GI-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
19 %c = call double @llvm.sin.f64(double %a)
23 define float @sin_f32(float %a) {
24 ; CHECK-SD-LABEL: sin_f32:
25 ; CHECK-SD: // %bb.0: // %entry
26 ; CHECK-SD-NEXT: b sinf
28 ; CHECK-GI-LABEL: sin_f32:
29 ; CHECK-GI: // %bb.0: // %entry
30 ; CHECK-GI-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
31 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 16
32 ; CHECK-GI-NEXT: .cfi_offset w30, -16
33 ; CHECK-GI-NEXT: bl sinf
34 ; CHECK-GI-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
37 %c = call float @llvm.sin.f32(float %a)
41 define half @sin_f16(half %a) {
42 ; CHECK-LABEL: sin_f16:
43 ; CHECK: // %bb.0: // %entry
44 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
45 ; CHECK-NEXT: .cfi_def_cfa_offset 16
46 ; CHECK-NEXT: .cfi_offset w30, -16
47 ; CHECK-NEXT: fcvt s0, h0
49 ; CHECK-NEXT: fcvt h0, s0
50 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
53 %c = call half @llvm.sin.f16(half %a)
57 define <2 x double> @sin_v2f64(<2 x double> %a) {
58 ; CHECK-SD-LABEL: sin_v2f64:
59 ; CHECK-SD: // %bb.0: // %entry
60 ; CHECK-SD-NEXT: sub sp, sp, #48
61 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
62 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
63 ; CHECK-SD-NEXT: .cfi_offset w30, -16
64 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
65 ; CHECK-SD-NEXT: mov d0, v0.d[1]
66 ; CHECK-SD-NEXT: bl sin
67 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
68 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
69 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
70 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
71 ; CHECK-SD-NEXT: bl sin
72 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
73 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
74 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
75 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
76 ; CHECK-SD-NEXT: add sp, sp, #48
79 ; CHECK-GI-LABEL: sin_v2f64:
80 ; CHECK-GI: // %bb.0: // %entry
81 ; CHECK-GI-NEXT: sub sp, sp, #32
82 ; CHECK-GI-NEXT: str d8, [sp, #16] // 8-byte Folded Spill
83 ; CHECK-GI-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
84 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 32
85 ; CHECK-GI-NEXT: .cfi_offset w30, -8
86 ; CHECK-GI-NEXT: .cfi_offset b8, -16
87 ; CHECK-GI-NEXT: mov d8, v0.d[1]
88 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
89 ; CHECK-GI-NEXT: bl sin
90 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
91 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
92 ; CHECK-GI-NEXT: fmov d0, d8
93 ; CHECK-GI-NEXT: bl sin
94 ; CHECK-GI-NEXT: ldr q1, [sp] // 16-byte Folded Reload
95 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
96 ; CHECK-GI-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
97 ; CHECK-GI-NEXT: ldr d8, [sp, #16] // 8-byte Folded Reload
98 ; CHECK-GI-NEXT: mov v1.d[1], v0.d[0]
99 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
100 ; CHECK-GI-NEXT: add sp, sp, #32
103 %c = call <2 x double> @llvm.sin.v2f64(<2 x double> %a)
107 define <3 x double> @sin_v3f64(<3 x double> %a) {
108 ; CHECK-SD-LABEL: sin_v3f64:
109 ; CHECK-SD: // %bb.0: // %entry
110 ; CHECK-SD-NEXT: str d10, [sp, #-32]! // 8-byte Folded Spill
111 ; CHECK-SD-NEXT: stp d9, d8, [sp, #8] // 16-byte Folded Spill
112 ; CHECK-SD-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
113 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 32
114 ; CHECK-SD-NEXT: .cfi_offset w30, -8
115 ; CHECK-SD-NEXT: .cfi_offset b8, -16
116 ; CHECK-SD-NEXT: .cfi_offset b9, -24
117 ; CHECK-SD-NEXT: .cfi_offset b10, -32
118 ; CHECK-SD-NEXT: fmov d8, d2
119 ; CHECK-SD-NEXT: fmov d9, d1
120 ; CHECK-SD-NEXT: bl sin
121 ; CHECK-SD-NEXT: fmov d10, d0
122 ; CHECK-SD-NEXT: fmov d0, d9
123 ; CHECK-SD-NEXT: bl sin
124 ; CHECK-SD-NEXT: fmov d9, d0
125 ; CHECK-SD-NEXT: fmov d0, d8
126 ; CHECK-SD-NEXT: bl sin
127 ; CHECK-SD-NEXT: fmov d1, d9
128 ; CHECK-SD-NEXT: ldp d9, d8, [sp, #8] // 16-byte Folded Reload
129 ; CHECK-SD-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
130 ; CHECK-SD-NEXT: fmov d2, d0
131 ; CHECK-SD-NEXT: fmov d0, d10
132 ; CHECK-SD-NEXT: ldr d10, [sp], #32 // 8-byte Folded Reload
135 ; CHECK-GI-LABEL: sin_v3f64:
136 ; CHECK-GI: // %bb.0: // %entry
137 ; CHECK-GI-NEXT: str d10, [sp, #-32]! // 8-byte Folded Spill
138 ; CHECK-GI-NEXT: stp d9, d8, [sp, #8] // 16-byte Folded Spill
139 ; CHECK-GI-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
140 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 32
141 ; CHECK-GI-NEXT: .cfi_offset w30, -8
142 ; CHECK-GI-NEXT: .cfi_offset b8, -16
143 ; CHECK-GI-NEXT: .cfi_offset b9, -24
144 ; CHECK-GI-NEXT: .cfi_offset b10, -32
145 ; CHECK-GI-NEXT: fmov d8, d1
146 ; CHECK-GI-NEXT: fmov d9, d2
147 ; CHECK-GI-NEXT: bl sin
148 ; CHECK-GI-NEXT: fmov d10, d0
149 ; CHECK-GI-NEXT: fmov d0, d8
150 ; CHECK-GI-NEXT: bl sin
151 ; CHECK-GI-NEXT: fmov d8, d0
152 ; CHECK-GI-NEXT: fmov d0, d9
153 ; CHECK-GI-NEXT: bl sin
154 ; CHECK-GI-NEXT: fmov d1, d8
155 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #8] // 16-byte Folded Reload
156 ; CHECK-GI-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
157 ; CHECK-GI-NEXT: fmov d2, d0
158 ; CHECK-GI-NEXT: fmov d0, d10
159 ; CHECK-GI-NEXT: ldr d10, [sp], #32 // 8-byte Folded Reload
162 %c = call <3 x double> @llvm.sin.v3f64(<3 x double> %a)
166 define <4 x double> @sin_v4f64(<4 x double> %a) {
167 ; CHECK-SD-LABEL: sin_v4f64:
168 ; CHECK-SD: // %bb.0: // %entry
169 ; CHECK-SD-NEXT: sub sp, sp, #64
170 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
171 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
172 ; CHECK-SD-NEXT: .cfi_offset w30, -16
173 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
174 ; CHECK-SD-NEXT: mov d0, v0.d[1]
175 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
176 ; CHECK-SD-NEXT: bl sin
177 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
178 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
179 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
180 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
181 ; CHECK-SD-NEXT: bl sin
182 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
183 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
184 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
185 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
186 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
187 ; CHECK-SD-NEXT: mov d0, v0.d[1]
188 ; CHECK-SD-NEXT: bl sin
189 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
190 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
191 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
192 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
193 ; CHECK-SD-NEXT: bl sin
194 ; CHECK-SD-NEXT: fmov d1, d0
195 ; CHECK-SD-NEXT: ldp q2, q0, [sp] // 32-byte Folded Reload
196 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
197 ; CHECK-SD-NEXT: mov v1.d[1], v2.d[0]
198 ; CHECK-SD-NEXT: add sp, sp, #64
201 ; CHECK-GI-LABEL: sin_v4f64:
202 ; CHECK-GI: // %bb.0: // %entry
203 ; CHECK-GI-NEXT: sub sp, sp, #80
204 ; CHECK-GI-NEXT: stp d9, d8, [sp, #48] // 16-byte Folded Spill
205 ; CHECK-GI-NEXT: str x30, [sp, #64] // 8-byte Folded Spill
206 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 80
207 ; CHECK-GI-NEXT: .cfi_offset w30, -16
208 ; CHECK-GI-NEXT: .cfi_offset b8, -24
209 ; CHECK-GI-NEXT: .cfi_offset b9, -32
210 ; CHECK-GI-NEXT: str q1, [sp] // 16-byte Folded Spill
211 ; CHECK-GI-NEXT: mov d8, v0.d[1]
212 ; CHECK-GI-NEXT: mov d9, v1.d[1]
213 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
214 ; CHECK-GI-NEXT: bl sin
215 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
216 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
217 ; CHECK-GI-NEXT: fmov d0, d8
218 ; CHECK-GI-NEXT: bl sin
219 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
220 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
221 ; CHECK-GI-NEXT: ldr q0, [sp] // 16-byte Folded Reload
222 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
223 ; CHECK-GI-NEXT: bl sin
224 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
225 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
226 ; CHECK-GI-NEXT: fmov d0, d9
227 ; CHECK-GI-NEXT: bl sin
228 ; CHECK-GI-NEXT: ldp q1, q2, [sp, #16] // 32-byte Folded Reload
229 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
230 ; CHECK-GI-NEXT: ldr x30, [sp, #64] // 8-byte Folded Reload
231 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #48] // 16-byte Folded Reload
232 ; CHECK-GI-NEXT: mov v2.d[1], v1.d[0]
233 ; CHECK-GI-NEXT: ldr q1, [sp] // 16-byte Folded Reload
234 ; CHECK-GI-NEXT: mov v1.d[1], v0.d[0]
235 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
236 ; CHECK-GI-NEXT: add sp, sp, #80
239 %c = call <4 x double> @llvm.sin.v4f64(<4 x double> %a)
243 define <2 x float> @sin_v2f32(<2 x float> %a) {
244 ; CHECK-SD-LABEL: sin_v2f32:
245 ; CHECK-SD: // %bb.0: // %entry
246 ; CHECK-SD-NEXT: sub sp, sp, #48
247 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
248 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
249 ; CHECK-SD-NEXT: .cfi_offset w30, -16
250 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
251 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
252 ; CHECK-SD-NEXT: mov s0, v0.s[1]
253 ; CHECK-SD-NEXT: bl sinf
254 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
255 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
256 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
257 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
258 ; CHECK-SD-NEXT: bl sinf
259 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
260 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
261 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
262 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
263 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
264 ; CHECK-SD-NEXT: add sp, sp, #48
267 ; CHECK-GI-LABEL: sin_v2f32:
268 ; CHECK-GI: // %bb.0: // %entry
269 ; CHECK-GI-NEXT: sub sp, sp, #32
270 ; CHECK-GI-NEXT: str d8, [sp, #16] // 8-byte Folded Spill
271 ; CHECK-GI-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
272 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 32
273 ; CHECK-GI-NEXT: .cfi_offset w30, -8
274 ; CHECK-GI-NEXT: .cfi_offset b8, -16
275 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
276 ; CHECK-GI-NEXT: mov s8, v0.s[1]
277 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
278 ; CHECK-GI-NEXT: bl sinf
279 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
280 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
281 ; CHECK-GI-NEXT: fmov s0, s8
282 ; CHECK-GI-NEXT: bl sinf
283 ; CHECK-GI-NEXT: ldr q1, [sp] // 16-byte Folded Reload
284 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
285 ; CHECK-GI-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
286 ; CHECK-GI-NEXT: ldr d8, [sp, #16] // 8-byte Folded Reload
287 ; CHECK-GI-NEXT: mov v1.s[1], v0.s[0]
288 ; CHECK-GI-NEXT: fmov d0, d1
289 ; CHECK-GI-NEXT: add sp, sp, #32
292 %c = call <2 x float> @llvm.sin.v2f32(<2 x float> %a)
296 define <3 x float> @sin_v3f32(<3 x float> %a) {
297 ; CHECK-SD-LABEL: sin_v3f32:
298 ; CHECK-SD: // %bb.0: // %entry
299 ; CHECK-SD-NEXT: sub sp, sp, #48
300 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
301 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
302 ; CHECK-SD-NEXT: .cfi_offset w30, -16
303 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
304 ; CHECK-SD-NEXT: mov s0, v0.s[1]
305 ; CHECK-SD-NEXT: bl sinf
306 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
307 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
308 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
309 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
310 ; CHECK-SD-NEXT: bl sinf
311 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
312 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
313 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
314 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
315 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
316 ; CHECK-SD-NEXT: mov s0, v0.s[2]
317 ; CHECK-SD-NEXT: bl sinf
318 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
319 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
320 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
321 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
322 ; CHECK-SD-NEXT: mov v0.16b, v1.16b
323 ; CHECK-SD-NEXT: add sp, sp, #48
326 ; CHECK-GI-LABEL: sin_v3f32:
327 ; CHECK-GI: // %bb.0: // %entry
328 ; CHECK-GI-NEXT: sub sp, sp, #64
329 ; CHECK-GI-NEXT: stp d9, d8, [sp, #32] // 16-byte Folded Spill
330 ; CHECK-GI-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
331 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 64
332 ; CHECK-GI-NEXT: .cfi_offset w30, -16
333 ; CHECK-GI-NEXT: .cfi_offset b8, -24
334 ; CHECK-GI-NEXT: .cfi_offset b9, -32
335 ; CHECK-GI-NEXT: mov s8, v0.s[1]
336 ; CHECK-GI-NEXT: mov s9, v0.s[2]
337 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
338 ; CHECK-GI-NEXT: bl sinf
339 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
340 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
341 ; CHECK-GI-NEXT: fmov s0, s8
342 ; CHECK-GI-NEXT: bl sinf
343 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
344 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
345 ; CHECK-GI-NEXT: fmov s0, s9
346 ; CHECK-GI-NEXT: bl sinf
347 ; CHECK-GI-NEXT: ldp q2, q1, [sp] // 32-byte Folded Reload
348 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
349 ; CHECK-GI-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
350 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #32] // 16-byte Folded Reload
351 ; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
352 ; CHECK-GI-NEXT: mov v1.s[2], v0.s[0]
353 ; CHECK-GI-NEXT: mov v1.s[3], v0.s[0]
354 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
355 ; CHECK-GI-NEXT: add sp, sp, #64
358 %c = call <3 x float> @llvm.sin.v3f32(<3 x float> %a)
362 define <4 x float> @sin_v4f32(<4 x float> %a) {
363 ; CHECK-SD-LABEL: sin_v4f32:
364 ; CHECK-SD: // %bb.0: // %entry
365 ; CHECK-SD-NEXT: sub sp, sp, #48
366 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
367 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
368 ; CHECK-SD-NEXT: .cfi_offset w30, -16
369 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
370 ; CHECK-SD-NEXT: mov s0, v0.s[1]
371 ; CHECK-SD-NEXT: bl sinf
372 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
373 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
374 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
375 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
376 ; CHECK-SD-NEXT: bl sinf
377 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
378 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
379 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
380 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
381 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
382 ; CHECK-SD-NEXT: mov s0, v0.s[2]
383 ; CHECK-SD-NEXT: bl sinf
384 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
385 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
386 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
387 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
388 ; CHECK-SD-NEXT: mov s0, v0.s[3]
389 ; CHECK-SD-NEXT: str q1, [sp] // 16-byte Folded Spill
390 ; CHECK-SD-NEXT: bl sinf
391 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
392 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
393 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
394 ; CHECK-SD-NEXT: mov v1.s[3], v0.s[0]
395 ; CHECK-SD-NEXT: mov v0.16b, v1.16b
396 ; CHECK-SD-NEXT: add sp, sp, #48
399 ; CHECK-GI-LABEL: sin_v4f32:
400 ; CHECK-GI: // %bb.0: // %entry
401 ; CHECK-GI-NEXT: sub sp, sp, #80
402 ; CHECK-GI-NEXT: str d10, [sp, #48] // 8-byte Folded Spill
403 ; CHECK-GI-NEXT: stp d9, d8, [sp, #56] // 16-byte Folded Spill
404 ; CHECK-GI-NEXT: str x30, [sp, #72] // 8-byte Folded Spill
405 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 80
406 ; CHECK-GI-NEXT: .cfi_offset w30, -8
407 ; CHECK-GI-NEXT: .cfi_offset b8, -16
408 ; CHECK-GI-NEXT: .cfi_offset b9, -24
409 ; CHECK-GI-NEXT: .cfi_offset b10, -32
410 ; CHECK-GI-NEXT: mov s8, v0.s[1]
411 ; CHECK-GI-NEXT: mov s9, v0.s[2]
412 ; CHECK-GI-NEXT: mov s10, v0.s[3]
413 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
414 ; CHECK-GI-NEXT: bl sinf
415 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
416 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
417 ; CHECK-GI-NEXT: fmov s0, s8
418 ; CHECK-GI-NEXT: bl sinf
419 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
420 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
421 ; CHECK-GI-NEXT: fmov s0, s9
422 ; CHECK-GI-NEXT: bl sinf
423 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
424 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
425 ; CHECK-GI-NEXT: fmov s0, s10
426 ; CHECK-GI-NEXT: bl sinf
427 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #16] // 32-byte Folded Reload
428 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
429 ; CHECK-GI-NEXT: ldr x30, [sp, #72] // 8-byte Folded Reload
430 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #56] // 16-byte Folded Reload
431 ; CHECK-GI-NEXT: ldr d10, [sp, #48] // 8-byte Folded Reload
432 ; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
433 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
434 ; CHECK-GI-NEXT: mov v1.s[2], v2.s[0]
435 ; CHECK-GI-NEXT: mov v1.s[3], v0.s[0]
436 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
437 ; CHECK-GI-NEXT: add sp, sp, #80
440 %c = call <4 x float> @llvm.sin.v4f32(<4 x float> %a)
444 define <8 x float> @sin_v8f32(<8 x float> %a) {
445 ; CHECK-SD-LABEL: sin_v8f32:
446 ; CHECK-SD: // %bb.0: // %entry
447 ; CHECK-SD-NEXT: sub sp, sp, #64
448 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
449 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
450 ; CHECK-SD-NEXT: .cfi_offset w30, -16
451 ; CHECK-SD-NEXT: stp q0, q1, [sp] // 32-byte Folded Spill
452 ; CHECK-SD-NEXT: mov s0, v0.s[1]
453 ; CHECK-SD-NEXT: bl sinf
454 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
455 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
456 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
457 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
458 ; CHECK-SD-NEXT: bl sinf
459 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
460 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
461 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
462 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
463 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
464 ; CHECK-SD-NEXT: mov s0, v0.s[2]
465 ; CHECK-SD-NEXT: bl sinf
466 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
467 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
468 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
469 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
470 ; CHECK-SD-NEXT: mov s0, v0.s[3]
471 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
472 ; CHECK-SD-NEXT: bl sinf
473 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
474 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
475 ; CHECK-SD-NEXT: mov v1.s[3], v0.s[0]
476 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
477 ; CHECK-SD-NEXT: mov s0, v0.s[1]
478 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
479 ; CHECK-SD-NEXT: bl sinf
480 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
481 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
482 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
483 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
484 ; CHECK-SD-NEXT: bl sinf
485 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
486 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
487 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
488 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
489 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
490 ; CHECK-SD-NEXT: mov s0, v0.s[2]
491 ; CHECK-SD-NEXT: bl sinf
492 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
493 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
494 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
495 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
496 ; CHECK-SD-NEXT: mov s0, v0.s[3]
497 ; CHECK-SD-NEXT: str q1, [sp] // 16-byte Folded Spill
498 ; CHECK-SD-NEXT: bl sinf
499 ; CHECK-SD-NEXT: fmov s2, s0
500 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
501 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
502 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
503 ; CHECK-SD-NEXT: mov v1.s[3], v2.s[0]
504 ; CHECK-SD-NEXT: add sp, sp, #64
507 ; CHECK-GI-LABEL: sin_v8f32:
508 ; CHECK-GI: // %bb.0: // %entry
509 ; CHECK-GI-NEXT: sub sp, sp, #176
510 ; CHECK-GI-NEXT: stp d13, d12, [sp, #112] // 16-byte Folded Spill
511 ; CHECK-GI-NEXT: stp d11, d10, [sp, #128] // 16-byte Folded Spill
512 ; CHECK-GI-NEXT: stp d9, d8, [sp, #144] // 16-byte Folded Spill
513 ; CHECK-GI-NEXT: str x30, [sp, #160] // 8-byte Folded Spill
514 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 176
515 ; CHECK-GI-NEXT: .cfi_offset w30, -16
516 ; CHECK-GI-NEXT: .cfi_offset b8, -24
517 ; CHECK-GI-NEXT: .cfi_offset b9, -32
518 ; CHECK-GI-NEXT: .cfi_offset b10, -40
519 ; CHECK-GI-NEXT: .cfi_offset b11, -48
520 ; CHECK-GI-NEXT: .cfi_offset b12, -56
521 ; CHECK-GI-NEXT: .cfi_offset b13, -64
522 ; CHECK-GI-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
523 ; CHECK-GI-NEXT: mov s8, v0.s[1]
524 ; CHECK-GI-NEXT: mov s9, v0.s[2]
525 ; CHECK-GI-NEXT: mov s10, v0.s[3]
526 ; CHECK-GI-NEXT: mov s11, v1.s[1]
527 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
528 ; CHECK-GI-NEXT: mov s12, v1.s[2]
529 ; CHECK-GI-NEXT: mov s13, v1.s[3]
530 ; CHECK-GI-NEXT: bl sinf
531 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
532 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
533 ; CHECK-GI-NEXT: fmov s0, s8
534 ; CHECK-GI-NEXT: bl sinf
535 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
536 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
537 ; CHECK-GI-NEXT: fmov s0, s9
538 ; CHECK-GI-NEXT: bl sinf
539 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
540 ; CHECK-GI-NEXT: str q0, [sp, #96] // 16-byte Folded Spill
541 ; CHECK-GI-NEXT: fmov s0, s10
542 ; CHECK-GI-NEXT: bl sinf
543 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
544 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
545 ; CHECK-GI-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
546 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
547 ; CHECK-GI-NEXT: bl sinf
548 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
549 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
550 ; CHECK-GI-NEXT: fmov s0, s11
551 ; CHECK-GI-NEXT: bl sinf
552 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
553 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
554 ; CHECK-GI-NEXT: fmov s0, s12
555 ; CHECK-GI-NEXT: bl sinf
556 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
557 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
558 ; CHECK-GI-NEXT: fmov s0, s13
559 ; CHECK-GI-NEXT: bl sinf
560 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #48] // 32-byte Folded Reload
561 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
562 ; CHECK-GI-NEXT: ldr x30, [sp, #160] // 8-byte Folded Reload
563 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #144] // 16-byte Folded Reload
564 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #128] // 16-byte Folded Reload
565 ; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
566 ; CHECK-GI-NEXT: ldp q2, q3, [sp, #16] // 32-byte Folded Reload
567 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #112] // 16-byte Folded Reload
568 ; CHECK-GI-NEXT: mov v3.s[1], v2.s[0]
569 ; CHECK-GI-NEXT: ldr q2, [sp, #96] // 16-byte Folded Reload
570 ; CHECK-GI-NEXT: mov v1.s[2], v2.s[0]
571 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
572 ; CHECK-GI-NEXT: mov v3.s[2], v2.s[0]
573 ; CHECK-GI-NEXT: ldr q2, [sp, #80] // 16-byte Folded Reload
574 ; CHECK-GI-NEXT: mov v1.s[3], v2.s[0]
575 ; CHECK-GI-NEXT: mov v3.s[3], v0.s[0]
576 ; CHECK-GI-NEXT: mov v2.16b, v1.16b
577 ; CHECK-GI-NEXT: mov v1.16b, v3.16b
578 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
579 ; CHECK-GI-NEXT: add sp, sp, #176
582 %c = call <8 x float> @llvm.sin.v8f32(<8 x float> %a)
586 define <7 x half> @sin_v7f16(<7 x half> %a) {
587 ; CHECK-SD-LABEL: sin_v7f16:
588 ; CHECK-SD: // %bb.0: // %entry
589 ; CHECK-SD-NEXT: sub sp, sp, #48
590 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
591 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
592 ; CHECK-SD-NEXT: .cfi_offset w30, -16
593 ; CHECK-SD-NEXT: mov h1, v0.h[1]
594 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
595 ; CHECK-SD-NEXT: fcvt s0, h1
596 ; CHECK-SD-NEXT: bl sinf
597 ; CHECK-SD-NEXT: fcvt h0, s0
598 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
599 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
600 ; CHECK-SD-NEXT: fcvt s0, h0
601 ; CHECK-SD-NEXT: bl sinf
602 ; CHECK-SD-NEXT: fcvt h0, s0
603 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
604 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
605 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
606 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
607 ; CHECK-SD-NEXT: mov h0, v0.h[2]
608 ; CHECK-SD-NEXT: fcvt s0, h0
609 ; CHECK-SD-NEXT: bl sinf
610 ; CHECK-SD-NEXT: fcvt h0, s0
611 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
612 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
613 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
614 ; CHECK-SD-NEXT: mov h0, v0.h[3]
615 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
616 ; CHECK-SD-NEXT: fcvt s0, h0
617 ; CHECK-SD-NEXT: bl sinf
618 ; CHECK-SD-NEXT: fcvt h0, s0
619 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
620 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
621 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
622 ; CHECK-SD-NEXT: mov h0, v0.h[4]
623 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
624 ; CHECK-SD-NEXT: fcvt s0, h0
625 ; CHECK-SD-NEXT: bl sinf
626 ; CHECK-SD-NEXT: fcvt h0, s0
627 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
628 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
629 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
630 ; CHECK-SD-NEXT: mov h0, v0.h[5]
631 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
632 ; CHECK-SD-NEXT: fcvt s0, h0
633 ; CHECK-SD-NEXT: bl sinf
634 ; CHECK-SD-NEXT: fcvt h0, s0
635 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
636 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
637 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
638 ; CHECK-SD-NEXT: mov h0, v0.h[6]
639 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
640 ; CHECK-SD-NEXT: fcvt s0, h0
641 ; CHECK-SD-NEXT: bl sinf
642 ; CHECK-SD-NEXT: fcvt h0, s0
643 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
644 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
645 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
646 ; CHECK-SD-NEXT: mov h0, v0.h[7]
647 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
648 ; CHECK-SD-NEXT: fcvt s0, h0
649 ; CHECK-SD-NEXT: bl sinf
650 ; CHECK-SD-NEXT: fcvt h1, s0
651 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
652 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
653 ; CHECK-SD-NEXT: mov v0.h[7], v1.h[0]
654 ; CHECK-SD-NEXT: add sp, sp, #48
657 ; CHECK-GI-LABEL: sin_v7f16:
658 ; CHECK-GI: // %bb.0: // %entry
659 ; CHECK-GI-NEXT: sub sp, sp, #160
660 ; CHECK-GI-NEXT: stp d13, d12, [sp, #96] // 16-byte Folded Spill
661 ; CHECK-GI-NEXT: stp d11, d10, [sp, #112] // 16-byte Folded Spill
662 ; CHECK-GI-NEXT: stp d9, d8, [sp, #128] // 16-byte Folded Spill
663 ; CHECK-GI-NEXT: str x30, [sp, #144] // 8-byte Folded Spill
664 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 160
665 ; CHECK-GI-NEXT: .cfi_offset w30, -16
666 ; CHECK-GI-NEXT: .cfi_offset b8, -24
667 ; CHECK-GI-NEXT: .cfi_offset b9, -32
668 ; CHECK-GI-NEXT: .cfi_offset b10, -40
669 ; CHECK-GI-NEXT: .cfi_offset b11, -48
670 ; CHECK-GI-NEXT: .cfi_offset b12, -56
671 ; CHECK-GI-NEXT: .cfi_offset b13, -64
672 ; CHECK-GI-NEXT: mov h8, v0.h[1]
673 ; CHECK-GI-NEXT: mov h9, v0.h[2]
674 ; CHECK-GI-NEXT: mov h10, v0.h[3]
675 ; CHECK-GI-NEXT: mov h11, v0.h[4]
676 ; CHECK-GI-NEXT: mov h12, v0.h[5]
677 ; CHECK-GI-NEXT: mov h13, v0.h[6]
678 ; CHECK-GI-NEXT: fcvt s0, h0
679 ; CHECK-GI-NEXT: bl sinf
680 ; CHECK-GI-NEXT: fcvt s1, h8
681 ; CHECK-GI-NEXT: fcvt h0, s0
682 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
683 ; CHECK-GI-NEXT: fmov s0, s1
684 ; CHECK-GI-NEXT: bl sinf
685 ; CHECK-GI-NEXT: fcvt s1, h9
686 ; CHECK-GI-NEXT: fcvt h0, s0
687 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
688 ; CHECK-GI-NEXT: fmov s0, s1
689 ; CHECK-GI-NEXT: bl sinf
690 ; CHECK-GI-NEXT: fcvt s1, h10
691 ; CHECK-GI-NEXT: fcvt h0, s0
692 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
693 ; CHECK-GI-NEXT: fmov s0, s1
694 ; CHECK-GI-NEXT: bl sinf
695 ; CHECK-GI-NEXT: fcvt s1, h11
696 ; CHECK-GI-NEXT: fcvt h0, s0
697 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
698 ; CHECK-GI-NEXT: fmov s0, s1
699 ; CHECK-GI-NEXT: bl sinf
700 ; CHECK-GI-NEXT: fcvt s1, h12
701 ; CHECK-GI-NEXT: fcvt h0, s0
702 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
703 ; CHECK-GI-NEXT: fmov s0, s1
704 ; CHECK-GI-NEXT: bl sinf
705 ; CHECK-GI-NEXT: fcvt s1, h13
706 ; CHECK-GI-NEXT: fcvt h0, s0
707 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
708 ; CHECK-GI-NEXT: fmov s0, s1
709 ; CHECK-GI-NEXT: bl sinf
710 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #64] // 32-byte Folded Reload
711 ; CHECK-GI-NEXT: fcvt h0, s0
712 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #128] // 16-byte Folded Reload
713 ; CHECK-GI-NEXT: ldr x30, [sp, #144] // 8-byte Folded Reload
714 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #112] // 16-byte Folded Reload
715 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
716 ; CHECK-GI-NEXT: ldr q2, [sp, #48] // 16-byte Folded Reload
717 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #96] // 16-byte Folded Reload
718 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
719 ; CHECK-GI-NEXT: ldr q2, [sp, #32] // 16-byte Folded Reload
720 ; CHECK-GI-NEXT: mov v1.h[3], v2.h[0]
721 ; CHECK-GI-NEXT: ldr q2, [sp, #16] // 16-byte Folded Reload
722 ; CHECK-GI-NEXT: mov v1.h[4], v2.h[0]
723 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
724 ; CHECK-GI-NEXT: mov v1.h[5], v2.h[0]
725 ; CHECK-GI-NEXT: mov v1.h[6], v0.h[0]
726 ; CHECK-GI-NEXT: mov v1.h[7], v0.h[0]
727 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
728 ; CHECK-GI-NEXT: add sp, sp, #160
731 %c = call <7 x half> @llvm.sin.v7f16(<7 x half> %a)
735 define <4 x half> @sin_v4f16(<4 x half> %a) {
736 ; CHECK-SD-LABEL: sin_v4f16:
737 ; CHECK-SD: // %bb.0: // %entry
738 ; CHECK-SD-NEXT: sub sp, sp, #48
739 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
740 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
741 ; CHECK-SD-NEXT: .cfi_offset w30, -16
742 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
743 ; CHECK-SD-NEXT: mov h1, v0.h[1]
744 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
745 ; CHECK-SD-NEXT: fcvt s0, h1
746 ; CHECK-SD-NEXT: bl sinf
747 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
748 ; CHECK-SD-NEXT: fcvt h0, s0
749 ; CHECK-SD-NEXT: fcvt s1, h1
750 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
751 ; CHECK-SD-NEXT: fmov s0, s1
752 ; CHECK-SD-NEXT: bl sinf
753 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
754 ; CHECK-SD-NEXT: fcvt h2, s0
755 ; CHECK-SD-NEXT: mov h1, v1.h[2]
756 ; CHECK-SD-NEXT: fcvt s0, h1
757 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
758 ; CHECK-SD-NEXT: mov v2.h[1], v1.h[0]
759 ; CHECK-SD-NEXT: str q2, [sp] // 16-byte Folded Spill
760 ; CHECK-SD-NEXT: bl sinf
761 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
762 ; CHECK-SD-NEXT: fcvt h2, s0
763 ; CHECK-SD-NEXT: mov h1, v1.h[3]
764 ; CHECK-SD-NEXT: fcvt s0, h1
765 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
766 ; CHECK-SD-NEXT: mov v1.h[2], v2.h[0]
767 ; CHECK-SD-NEXT: str q1, [sp] // 16-byte Folded Spill
768 ; CHECK-SD-NEXT: bl sinf
769 ; CHECK-SD-NEXT: fcvt h1, s0
770 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
771 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
772 ; CHECK-SD-NEXT: mov v0.h[3], v1.h[0]
773 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
774 ; CHECK-SD-NEXT: add sp, sp, #48
777 ; CHECK-GI-LABEL: sin_v4f16:
778 ; CHECK-GI: // %bb.0: // %entry
779 ; CHECK-GI-NEXT: sub sp, sp, #80
780 ; CHECK-GI-NEXT: str d10, [sp, #48] // 8-byte Folded Spill
781 ; CHECK-GI-NEXT: stp d9, d8, [sp, #56] // 16-byte Folded Spill
782 ; CHECK-GI-NEXT: str x30, [sp, #72] // 8-byte Folded Spill
783 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 80
784 ; CHECK-GI-NEXT: .cfi_offset w30, -8
785 ; CHECK-GI-NEXT: .cfi_offset b8, -16
786 ; CHECK-GI-NEXT: .cfi_offset b9, -24
787 ; CHECK-GI-NEXT: .cfi_offset b10, -32
788 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
789 ; CHECK-GI-NEXT: mov h8, v0.h[1]
790 ; CHECK-GI-NEXT: mov h9, v0.h[2]
791 ; CHECK-GI-NEXT: mov h10, v0.h[3]
792 ; CHECK-GI-NEXT: fcvt s0, h0
793 ; CHECK-GI-NEXT: bl sinf
794 ; CHECK-GI-NEXT: fcvt s1, h8
795 ; CHECK-GI-NEXT: fcvt h0, s0
796 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
797 ; CHECK-GI-NEXT: fmov s0, s1
798 ; CHECK-GI-NEXT: bl sinf
799 ; CHECK-GI-NEXT: fcvt s1, h9
800 ; CHECK-GI-NEXT: fcvt h0, s0
801 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
802 ; CHECK-GI-NEXT: fmov s0, s1
803 ; CHECK-GI-NEXT: bl sinf
804 ; CHECK-GI-NEXT: fcvt s1, h10
805 ; CHECK-GI-NEXT: fcvt h0, s0
806 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
807 ; CHECK-GI-NEXT: fmov s0, s1
808 ; CHECK-GI-NEXT: bl sinf
809 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #16] // 32-byte Folded Reload
810 ; CHECK-GI-NEXT: fcvt h0, s0
811 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #56] // 16-byte Folded Reload
812 ; CHECK-GI-NEXT: ldr x30, [sp, #72] // 8-byte Folded Reload
813 ; CHECK-GI-NEXT: ldr d10, [sp, #48] // 8-byte Folded Reload
814 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
815 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
816 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
817 ; CHECK-GI-NEXT: mov v1.h[3], v0.h[0]
818 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
819 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
820 ; CHECK-GI-NEXT: add sp, sp, #80
823 %c = call <4 x half> @llvm.sin.v4f16(<4 x half> %a)
827 define <8 x half> @sin_v8f16(<8 x half> %a) {
828 ; CHECK-SD-LABEL: sin_v8f16:
829 ; CHECK-SD: // %bb.0: // %entry
830 ; CHECK-SD-NEXT: sub sp, sp, #48
831 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
832 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
833 ; CHECK-SD-NEXT: .cfi_offset w30, -16
834 ; CHECK-SD-NEXT: mov h1, v0.h[1]
835 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
836 ; CHECK-SD-NEXT: fcvt s0, h1
837 ; CHECK-SD-NEXT: bl sinf
838 ; CHECK-SD-NEXT: fcvt h0, s0
839 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
840 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
841 ; CHECK-SD-NEXT: fcvt s0, h0
842 ; CHECK-SD-NEXT: bl sinf
843 ; CHECK-SD-NEXT: fcvt h0, s0
844 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
845 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
846 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
847 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
848 ; CHECK-SD-NEXT: mov h0, v0.h[2]
849 ; CHECK-SD-NEXT: fcvt s0, h0
850 ; CHECK-SD-NEXT: bl sinf
851 ; CHECK-SD-NEXT: fcvt h0, s0
852 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
853 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
854 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
855 ; CHECK-SD-NEXT: mov h0, v0.h[3]
856 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
857 ; CHECK-SD-NEXT: fcvt s0, h0
858 ; CHECK-SD-NEXT: bl sinf
859 ; CHECK-SD-NEXT: fcvt h0, s0
860 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
861 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
862 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
863 ; CHECK-SD-NEXT: mov h0, v0.h[4]
864 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
865 ; CHECK-SD-NEXT: fcvt s0, h0
866 ; CHECK-SD-NEXT: bl sinf
867 ; CHECK-SD-NEXT: fcvt h0, s0
868 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
869 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
870 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
871 ; CHECK-SD-NEXT: mov h0, v0.h[5]
872 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
873 ; CHECK-SD-NEXT: fcvt s0, h0
874 ; CHECK-SD-NEXT: bl sinf
875 ; CHECK-SD-NEXT: fcvt h0, s0
876 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
877 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
878 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
879 ; CHECK-SD-NEXT: mov h0, v0.h[6]
880 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
881 ; CHECK-SD-NEXT: fcvt s0, h0
882 ; CHECK-SD-NEXT: bl sinf
883 ; CHECK-SD-NEXT: fcvt h0, s0
884 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
885 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
886 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
887 ; CHECK-SD-NEXT: mov h0, v0.h[7]
888 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
889 ; CHECK-SD-NEXT: fcvt s0, h0
890 ; CHECK-SD-NEXT: bl sinf
891 ; CHECK-SD-NEXT: fcvt h1, s0
892 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
893 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
894 ; CHECK-SD-NEXT: mov v0.h[7], v1.h[0]
895 ; CHECK-SD-NEXT: add sp, sp, #48
898 ; CHECK-GI-LABEL: sin_v8f16:
899 ; CHECK-GI: // %bb.0: // %entry
900 ; CHECK-GI-NEXT: sub sp, sp, #176
901 ; CHECK-GI-NEXT: str d14, [sp, #112] // 8-byte Folded Spill
902 ; CHECK-GI-NEXT: stp d13, d12, [sp, #120] // 16-byte Folded Spill
903 ; CHECK-GI-NEXT: stp d11, d10, [sp, #136] // 16-byte Folded Spill
904 ; CHECK-GI-NEXT: stp d9, d8, [sp, #152] // 16-byte Folded Spill
905 ; CHECK-GI-NEXT: str x30, [sp, #168] // 8-byte Folded Spill
906 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 176
907 ; CHECK-GI-NEXT: .cfi_offset w30, -8
908 ; CHECK-GI-NEXT: .cfi_offset b8, -16
909 ; CHECK-GI-NEXT: .cfi_offset b9, -24
910 ; CHECK-GI-NEXT: .cfi_offset b10, -32
911 ; CHECK-GI-NEXT: .cfi_offset b11, -40
912 ; CHECK-GI-NEXT: .cfi_offset b12, -48
913 ; CHECK-GI-NEXT: .cfi_offset b13, -56
914 ; CHECK-GI-NEXT: .cfi_offset b14, -64
915 ; CHECK-GI-NEXT: mov h8, v0.h[1]
916 ; CHECK-GI-NEXT: mov h9, v0.h[2]
917 ; CHECK-GI-NEXT: mov h10, v0.h[3]
918 ; CHECK-GI-NEXT: mov h11, v0.h[4]
919 ; CHECK-GI-NEXT: mov h12, v0.h[5]
920 ; CHECK-GI-NEXT: mov h13, v0.h[6]
921 ; CHECK-GI-NEXT: mov h14, v0.h[7]
922 ; CHECK-GI-NEXT: fcvt s0, h0
923 ; CHECK-GI-NEXT: bl sinf
924 ; CHECK-GI-NEXT: fcvt s1, h8
925 ; CHECK-GI-NEXT: fcvt h0, s0
926 ; CHECK-GI-NEXT: str q0, [sp, #96] // 16-byte Folded Spill
927 ; CHECK-GI-NEXT: fmov s0, s1
928 ; CHECK-GI-NEXT: bl sinf
929 ; CHECK-GI-NEXT: fcvt s1, h9
930 ; CHECK-GI-NEXT: fcvt h0, s0
931 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
932 ; CHECK-GI-NEXT: fmov s0, s1
933 ; CHECK-GI-NEXT: bl sinf
934 ; CHECK-GI-NEXT: fcvt s1, h10
935 ; CHECK-GI-NEXT: fcvt h0, s0
936 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
937 ; CHECK-GI-NEXT: fmov s0, s1
938 ; CHECK-GI-NEXT: bl sinf
939 ; CHECK-GI-NEXT: fcvt s1, h11
940 ; CHECK-GI-NEXT: fcvt h0, s0
941 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
942 ; CHECK-GI-NEXT: fmov s0, s1
943 ; CHECK-GI-NEXT: bl sinf
944 ; CHECK-GI-NEXT: fcvt s1, h12
945 ; CHECK-GI-NEXT: fcvt h0, s0
946 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
947 ; CHECK-GI-NEXT: fmov s0, s1
948 ; CHECK-GI-NEXT: bl sinf
949 ; CHECK-GI-NEXT: fcvt s1, h13
950 ; CHECK-GI-NEXT: fcvt h0, s0
951 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
952 ; CHECK-GI-NEXT: fmov s0, s1
953 ; CHECK-GI-NEXT: bl sinf
954 ; CHECK-GI-NEXT: fcvt s1, h14
955 ; CHECK-GI-NEXT: fcvt h0, s0
956 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
957 ; CHECK-GI-NEXT: fmov s0, s1
958 ; CHECK-GI-NEXT: bl sinf
959 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #80] // 32-byte Folded Reload
960 ; CHECK-GI-NEXT: fcvt h0, s0
961 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #152] // 16-byte Folded Reload
962 ; CHECK-GI-NEXT: ldr x30, [sp, #168] // 8-byte Folded Reload
963 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #136] // 16-byte Folded Reload
964 ; CHECK-GI-NEXT: ldr d14, [sp, #112] // 8-byte Folded Reload
965 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
966 ; CHECK-GI-NEXT: ldr q2, [sp, #64] // 16-byte Folded Reload
967 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #120] // 16-byte Folded Reload
968 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
969 ; CHECK-GI-NEXT: ldr q2, [sp, #48] // 16-byte Folded Reload
970 ; CHECK-GI-NEXT: mov v1.h[3], v2.h[0]
971 ; CHECK-GI-NEXT: ldr q2, [sp, #32] // 16-byte Folded Reload
972 ; CHECK-GI-NEXT: mov v1.h[4], v2.h[0]
973 ; CHECK-GI-NEXT: ldr q2, [sp, #16] // 16-byte Folded Reload
974 ; CHECK-GI-NEXT: mov v1.h[5], v2.h[0]
975 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
976 ; CHECK-GI-NEXT: mov v1.h[6], v2.h[0]
977 ; CHECK-GI-NEXT: mov v1.h[7], v0.h[0]
978 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
979 ; CHECK-GI-NEXT: add sp, sp, #176
982 %c = call <8 x half> @llvm.sin.v8f16(<8 x half> %a)
986 define <16 x half> @sin_v16f16(<16 x half> %a) {
987 ; CHECK-SD-LABEL: sin_v16f16:
988 ; CHECK-SD: // %bb.0: // %entry
989 ; CHECK-SD-NEXT: sub sp, sp, #64
990 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
991 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
992 ; CHECK-SD-NEXT: .cfi_offset w30, -16
993 ; CHECK-SD-NEXT: stp q1, q0, [sp] // 32-byte Folded Spill
994 ; CHECK-SD-NEXT: mov h1, v0.h[1]
995 ; CHECK-SD-NEXT: fcvt s0, h1
996 ; CHECK-SD-NEXT: bl sinf
997 ; CHECK-SD-NEXT: fcvt h0, s0
998 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
999 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1000 ; CHECK-SD-NEXT: fcvt s0, h0
1001 ; CHECK-SD-NEXT: bl sinf
1002 ; CHECK-SD-NEXT: fcvt h0, s0
1003 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1004 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
1005 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1006 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1007 ; CHECK-SD-NEXT: mov h0, v0.h[2]
1008 ; CHECK-SD-NEXT: fcvt s0, h0
1009 ; CHECK-SD-NEXT: bl sinf
1010 ; CHECK-SD-NEXT: fcvt h0, s0
1011 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1012 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
1013 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1014 ; CHECK-SD-NEXT: mov h0, v0.h[3]
1015 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1016 ; CHECK-SD-NEXT: fcvt s0, h0
1017 ; CHECK-SD-NEXT: bl sinf
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: ldr q0, [sp, #16] // 16-byte Folded Reload
1022 ; CHECK-SD-NEXT: mov h0, v0.h[4]
1023 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1024 ; CHECK-SD-NEXT: fcvt s0, h0
1025 ; CHECK-SD-NEXT: bl sinf
1026 ; CHECK-SD-NEXT: fcvt h0, s0
1027 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1028 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
1029 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1030 ; CHECK-SD-NEXT: mov h0, v0.h[5]
1031 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1032 ; CHECK-SD-NEXT: fcvt s0, h0
1033 ; CHECK-SD-NEXT: bl sinf
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[5], v0.h[0]
1037 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1038 ; CHECK-SD-NEXT: mov h0, v0.h[6]
1039 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1040 ; CHECK-SD-NEXT: fcvt s0, h0
1041 ; CHECK-SD-NEXT: bl sinf
1042 ; CHECK-SD-NEXT: fcvt h0, s0
1043 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1044 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
1045 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1046 ; CHECK-SD-NEXT: mov h0, v0.h[7]
1047 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1048 ; CHECK-SD-NEXT: fcvt s0, h0
1049 ; CHECK-SD-NEXT: bl sinf
1050 ; CHECK-SD-NEXT: fcvt h0, s0
1051 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1052 ; CHECK-SD-NEXT: mov v1.h[7], v0.h[0]
1053 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1054 ; CHECK-SD-NEXT: mov h0, v0.h[1]
1055 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1056 ; CHECK-SD-NEXT: fcvt s0, h0
1057 ; CHECK-SD-NEXT: bl sinf
1058 ; CHECK-SD-NEXT: fcvt h0, s0
1059 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1060 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1061 ; CHECK-SD-NEXT: fcvt s0, h0
1062 ; CHECK-SD-NEXT: bl sinf
1063 ; CHECK-SD-NEXT: fcvt h0, s0
1064 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1065 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
1066 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1067 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1068 ; CHECK-SD-NEXT: mov h0, v0.h[2]
1069 ; CHECK-SD-NEXT: fcvt s0, h0
1070 ; CHECK-SD-NEXT: bl sinf
1071 ; CHECK-SD-NEXT: fcvt h0, s0
1072 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1073 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
1074 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1075 ; CHECK-SD-NEXT: mov h0, v0.h[3]
1076 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1077 ; CHECK-SD-NEXT: fcvt s0, h0
1078 ; CHECK-SD-NEXT: bl sinf
1079 ; CHECK-SD-NEXT: fcvt h0, s0
1080 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1081 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
1082 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1083 ; CHECK-SD-NEXT: mov h0, v0.h[4]
1084 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1085 ; CHECK-SD-NEXT: fcvt s0, h0
1086 ; CHECK-SD-NEXT: bl sinf
1087 ; CHECK-SD-NEXT: fcvt h0, s0
1088 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1089 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
1090 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1091 ; CHECK-SD-NEXT: mov h0, v0.h[5]
1092 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1093 ; CHECK-SD-NEXT: fcvt s0, h0
1094 ; CHECK-SD-NEXT: bl sinf
1095 ; CHECK-SD-NEXT: fcvt h0, s0
1096 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1097 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
1098 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1099 ; CHECK-SD-NEXT: mov h0, v0.h[6]
1100 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1101 ; CHECK-SD-NEXT: fcvt s0, h0
1102 ; CHECK-SD-NEXT: bl sinf
1103 ; CHECK-SD-NEXT: fcvt h0, s0
1104 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1105 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
1106 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1107 ; CHECK-SD-NEXT: mov h0, v0.h[7]
1108 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1109 ; CHECK-SD-NEXT: fcvt s0, h0
1110 ; CHECK-SD-NEXT: bl sinf
1111 ; CHECK-SD-NEXT: fmov s1, s0
1112 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
1113 ; CHECK-SD-NEXT: fcvt h2, s1
1114 ; CHECK-SD-NEXT: ldp q1, q0, [sp, #16] // 32-byte Folded Reload
1115 ; CHECK-SD-NEXT: mov v1.h[7], v2.h[0]
1116 ; CHECK-SD-NEXT: add sp, sp, #64
1117 ; CHECK-SD-NEXT: ret
1119 ; CHECK-GI-LABEL: sin_v16f16:
1120 ; CHECK-GI: // %bb.0: // %entry
1121 ; CHECK-GI-NEXT: sub sp, sp, #320
1122 ; CHECK-GI-NEXT: stp d15, d14, [sp, #240] // 16-byte Folded Spill
1123 ; CHECK-GI-NEXT: stp d13, d12, [sp, #256] // 16-byte Folded Spill
1124 ; CHECK-GI-NEXT: stp d11, d10, [sp, #272] // 16-byte Folded Spill
1125 ; CHECK-GI-NEXT: stp d9, d8, [sp, #288] // 16-byte Folded Spill
1126 ; CHECK-GI-NEXT: stp x29, x30, [sp, #304] // 16-byte Folded Spill
1127 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 320
1128 ; CHECK-GI-NEXT: .cfi_offset w30, -8
1129 ; CHECK-GI-NEXT: .cfi_offset w29, -16
1130 ; CHECK-GI-NEXT: .cfi_offset b8, -24
1131 ; CHECK-GI-NEXT: .cfi_offset b9, -32
1132 ; CHECK-GI-NEXT: .cfi_offset b10, -40
1133 ; CHECK-GI-NEXT: .cfi_offset b11, -48
1134 ; CHECK-GI-NEXT: .cfi_offset b12, -56
1135 ; CHECK-GI-NEXT: .cfi_offset b13, -64
1136 ; CHECK-GI-NEXT: .cfi_offset b14, -72
1137 ; CHECK-GI-NEXT: .cfi_offset b15, -80
1138 ; CHECK-GI-NEXT: mov v2.16b, v1.16b
1139 ; CHECK-GI-NEXT: str q1, [sp, #80] // 16-byte Folded Spill
1140 ; CHECK-GI-NEXT: mov h14, v1.h[1]
1141 ; CHECK-GI-NEXT: mov h1, v1.h[2]
1142 ; CHECK-GI-NEXT: mov h15, v0.h[1]
1143 ; CHECK-GI-NEXT: mov h8, v0.h[2]
1144 ; CHECK-GI-NEXT: mov h9, v0.h[3]
1145 ; CHECK-GI-NEXT: mov h10, v0.h[4]
1146 ; CHECK-GI-NEXT: mov h11, v0.h[5]
1147 ; CHECK-GI-NEXT: mov h12, v0.h[6]
1148 ; CHECK-GI-NEXT: mov h13, v0.h[7]
1149 ; CHECK-GI-NEXT: fcvt s0, h0
1150 ; CHECK-GI-NEXT: str h1, [sp, #16] // 2-byte Folded Spill
1151 ; CHECK-GI-NEXT: mov h1, v2.h[3]
1152 ; CHECK-GI-NEXT: str h1, [sp, #32] // 2-byte Folded Spill
1153 ; CHECK-GI-NEXT: mov h1, v2.h[4]
1154 ; CHECK-GI-NEXT: str h1, [sp, #48] // 2-byte Folded Spill
1155 ; CHECK-GI-NEXT: mov h1, v2.h[5]
1156 ; CHECK-GI-NEXT: str h1, [sp, #64] // 2-byte Folded Spill
1157 ; CHECK-GI-NEXT: mov h1, v2.h[6]
1158 ; CHECK-GI-NEXT: str h1, [sp, #96] // 2-byte Folded Spill
1159 ; CHECK-GI-NEXT: mov h1, v2.h[7]
1160 ; CHECK-GI-NEXT: str h1, [sp, #160] // 2-byte Folded Spill
1161 ; CHECK-GI-NEXT: bl sinf
1162 ; CHECK-GI-NEXT: fcvt s1, h15
1163 ; CHECK-GI-NEXT: fcvt h0, s0
1164 ; CHECK-GI-NEXT: str q0, [sp, #192] // 16-byte Folded Spill
1165 ; CHECK-GI-NEXT: fmov s0, s1
1166 ; CHECK-GI-NEXT: bl sinf
1167 ; CHECK-GI-NEXT: fcvt s1, h8
1168 ; CHECK-GI-NEXT: fcvt h0, s0
1169 ; CHECK-GI-NEXT: str q0, [sp, #128] // 16-byte Folded Spill
1170 ; CHECK-GI-NEXT: fmov s0, s1
1171 ; CHECK-GI-NEXT: bl sinf
1172 ; CHECK-GI-NEXT: fcvt s1, h9
1173 ; CHECK-GI-NEXT: fcvt h0, s0
1174 ; CHECK-GI-NEXT: str q0, [sp, #224] // 16-byte Folded Spill
1175 ; CHECK-GI-NEXT: fmov s0, s1
1176 ; CHECK-GI-NEXT: bl sinf
1177 ; CHECK-GI-NEXT: fcvt s1, h10
1178 ; CHECK-GI-NEXT: fcvt h0, s0
1179 ; CHECK-GI-NEXT: str q0, [sp, #208] // 16-byte Folded Spill
1180 ; CHECK-GI-NEXT: fmov s0, s1
1181 ; CHECK-GI-NEXT: bl sinf
1182 ; CHECK-GI-NEXT: fcvt s1, h11
1183 ; CHECK-GI-NEXT: fcvt h0, s0
1184 ; CHECK-GI-NEXT: str q0, [sp, #176] // 16-byte Folded Spill
1185 ; CHECK-GI-NEXT: fmov s0, s1
1186 ; CHECK-GI-NEXT: bl sinf
1187 ; CHECK-GI-NEXT: fcvt s1, h12
1188 ; CHECK-GI-NEXT: fcvt h0, s0
1189 ; CHECK-GI-NEXT: str q0, [sp, #144] // 16-byte Folded Spill
1190 ; CHECK-GI-NEXT: fmov s0, s1
1191 ; CHECK-GI-NEXT: bl sinf
1192 ; CHECK-GI-NEXT: fcvt s1, h13
1193 ; CHECK-GI-NEXT: fcvt h0, s0
1194 ; CHECK-GI-NEXT: str q0, [sp, #112] // 16-byte Folded Spill
1195 ; CHECK-GI-NEXT: fmov s0, s1
1196 ; CHECK-GI-NEXT: bl sinf
1197 ; CHECK-GI-NEXT: ldr q1, [sp, #80] // 16-byte Folded Reload
1198 ; CHECK-GI-NEXT: fcvt h0, s0
1199 ; CHECK-GI-NEXT: fcvt s1, h1
1200 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
1201 ; CHECK-GI-NEXT: fmov s0, s1
1202 ; CHECK-GI-NEXT: bl sinf
1203 ; CHECK-GI-NEXT: fcvt s1, h14
1204 ; CHECK-GI-NEXT: fcvt h0, s0
1205 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
1206 ; CHECK-GI-NEXT: fmov s0, s1
1207 ; CHECK-GI-NEXT: bl sinf
1208 ; CHECK-GI-NEXT: ldr h1, [sp, #16] // 2-byte Folded Reload
1209 ; CHECK-GI-NEXT: fcvt h0, s0
1210 ; CHECK-GI-NEXT: fcvt s1, h1
1211 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1212 ; CHECK-GI-NEXT: fmov s0, s1
1213 ; CHECK-GI-NEXT: bl sinf
1214 ; CHECK-GI-NEXT: ldr h1, [sp, #32] // 2-byte Folded Reload
1215 ; CHECK-GI-NEXT: fcvt h0, s0
1216 ; CHECK-GI-NEXT: fcvt s1, h1
1217 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1218 ; CHECK-GI-NEXT: fmov s0, s1
1219 ; CHECK-GI-NEXT: bl sinf
1220 ; CHECK-GI-NEXT: ldr h1, [sp, #48] // 2-byte Folded Reload
1221 ; CHECK-GI-NEXT: fcvt h0, s0
1222 ; CHECK-GI-NEXT: fcvt s1, h1
1223 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
1224 ; CHECK-GI-NEXT: fmov s0, s1
1225 ; CHECK-GI-NEXT: bl sinf
1226 ; CHECK-GI-NEXT: ldr h1, [sp, #64] // 2-byte Folded Reload
1227 ; CHECK-GI-NEXT: fcvt h0, s0
1228 ; CHECK-GI-NEXT: fcvt s1, h1
1229 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
1230 ; CHECK-GI-NEXT: fmov s0, s1
1231 ; CHECK-GI-NEXT: bl sinf
1232 ; CHECK-GI-NEXT: ldr h1, [sp, #96] // 2-byte Folded Reload
1233 ; CHECK-GI-NEXT: fcvt h0, s0
1234 ; CHECK-GI-NEXT: fcvt s1, h1
1235 ; CHECK-GI-NEXT: str q0, [sp, #96] // 16-byte Folded Spill
1236 ; CHECK-GI-NEXT: fmov s0, s1
1237 ; CHECK-GI-NEXT: bl sinf
1238 ; CHECK-GI-NEXT: ldr h1, [sp, #160] // 2-byte Folded Reload
1239 ; CHECK-GI-NEXT: fcvt h0, s0
1240 ; CHECK-GI-NEXT: fcvt s1, h1
1241 ; CHECK-GI-NEXT: str q0, [sp, #160] // 16-byte Folded Spill
1242 ; CHECK-GI-NEXT: fmov s0, s1
1243 ; CHECK-GI-NEXT: bl sinf
1244 ; CHECK-GI-NEXT: ldr q3, [sp, #192] // 16-byte Folded Reload
1245 ; CHECK-GI-NEXT: ldr q2, [sp, #128] // 16-byte Folded Reload
1246 ; CHECK-GI-NEXT: ldp x29, x30, [sp, #304] // 16-byte Folded Reload
1247 ; CHECK-GI-NEXT: mov v3.h[1], v2.h[0]
1248 ; CHECK-GI-NEXT: ldp q1, q2, [sp] // 32-byte Folded Reload
1249 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #288] // 16-byte Folded Reload
1250 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #272] // 16-byte Folded Reload
1251 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
1252 ; CHECK-GI-NEXT: ldr q2, [sp, #224] // 16-byte Folded Reload
1253 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #256] // 16-byte Folded Reload
1254 ; CHECK-GI-NEXT: mov v3.h[2], v2.h[0]
1255 ; CHECK-GI-NEXT: ldr q2, [sp, #32] // 16-byte Folded Reload
1256 ; CHECK-GI-NEXT: ldp d15, d14, [sp, #240] // 16-byte Folded Reload
1257 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
1258 ; CHECK-GI-NEXT: ldr q2, [sp, #208] // 16-byte Folded Reload
1259 ; CHECK-GI-NEXT: mov v3.h[3], v2.h[0]
1260 ; CHECK-GI-NEXT: ldr q2, [sp, #48] // 16-byte Folded Reload
1261 ; CHECK-GI-NEXT: mov v1.h[3], v2.h[0]
1262 ; CHECK-GI-NEXT: ldr q2, [sp, #176] // 16-byte Folded Reload
1263 ; CHECK-GI-NEXT: mov v3.h[4], v2.h[0]
1264 ; CHECK-GI-NEXT: ldr q2, [sp, #64] // 16-byte Folded Reload
1265 ; CHECK-GI-NEXT: mov v1.h[4], v2.h[0]
1266 ; CHECK-GI-NEXT: ldr q2, [sp, #144] // 16-byte Folded Reload
1267 ; CHECK-GI-NEXT: mov v3.h[5], v2.h[0]
1268 ; CHECK-GI-NEXT: ldr q2, [sp, #96] // 16-byte Folded Reload
1269 ; CHECK-GI-NEXT: mov v1.h[5], v2.h[0]
1270 ; CHECK-GI-NEXT: fcvt h2, s0
1271 ; CHECK-GI-NEXT: ldr q0, [sp, #112] // 16-byte Folded Reload
1272 ; CHECK-GI-NEXT: mov v3.h[6], v0.h[0]
1273 ; CHECK-GI-NEXT: ldr q0, [sp, #160] // 16-byte Folded Reload
1274 ; CHECK-GI-NEXT: mov v1.h[6], v0.h[0]
1275 ; CHECK-GI-NEXT: ldr q0, [sp, #80] // 16-byte Folded Reload
1276 ; CHECK-GI-NEXT: mov v3.h[7], v0.h[0]
1277 ; CHECK-GI-NEXT: mov v1.h[7], v2.h[0]
1278 ; CHECK-GI-NEXT: mov v0.16b, v3.16b
1279 ; CHECK-GI-NEXT: add sp, sp, #320
1280 ; CHECK-GI-NEXT: ret
1282 %c = call <16 x half> @llvm.sin.v16f16(<16 x half> %a)
1286 define double @cos_f64(double %a) {
1287 ; CHECK-SD-LABEL: cos_f64:
1288 ; CHECK-SD: // %bb.0: // %entry
1289 ; CHECK-SD-NEXT: b cos
1291 ; CHECK-GI-LABEL: cos_f64:
1292 ; CHECK-GI: // %bb.0: // %entry
1293 ; CHECK-GI-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
1294 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 16
1295 ; CHECK-GI-NEXT: .cfi_offset w30, -16
1296 ; CHECK-GI-NEXT: bl cos
1297 ; CHECK-GI-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
1298 ; CHECK-GI-NEXT: ret
1300 %c = call double @llvm.cos.f64(double %a)
1304 define float @cos_f32(float %a) {
1305 ; CHECK-SD-LABEL: cos_f32:
1306 ; CHECK-SD: // %bb.0: // %entry
1307 ; CHECK-SD-NEXT: b cosf
1309 ; CHECK-GI-LABEL: cos_f32:
1310 ; CHECK-GI: // %bb.0: // %entry
1311 ; CHECK-GI-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
1312 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 16
1313 ; CHECK-GI-NEXT: .cfi_offset w30, -16
1314 ; CHECK-GI-NEXT: bl cosf
1315 ; CHECK-GI-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
1316 ; CHECK-GI-NEXT: ret
1318 %c = call float @llvm.cos.f32(float %a)
1322 define half @cos_f16(half %a) {
1323 ; CHECK-LABEL: cos_f16:
1324 ; CHECK: // %bb.0: // %entry
1325 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
1326 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1327 ; CHECK-NEXT: .cfi_offset w30, -16
1328 ; CHECK-NEXT: fcvt s0, h0
1329 ; CHECK-NEXT: bl cosf
1330 ; CHECK-NEXT: fcvt h0, s0
1331 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
1334 %c = call half @llvm.cos.f16(half %a)
1338 define <2 x double> @cos_v2f64(<2 x double> %a) {
1339 ; CHECK-SD-LABEL: cos_v2f64:
1340 ; CHECK-SD: // %bb.0: // %entry
1341 ; CHECK-SD-NEXT: sub sp, sp, #48
1342 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
1343 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
1344 ; CHECK-SD-NEXT: .cfi_offset w30, -16
1345 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1346 ; CHECK-SD-NEXT: mov d0, v0.d[1]
1347 ; CHECK-SD-NEXT: bl cos
1348 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
1349 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1350 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1351 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
1352 ; CHECK-SD-NEXT: bl cos
1353 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1354 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
1355 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
1356 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
1357 ; CHECK-SD-NEXT: add sp, sp, #48
1358 ; CHECK-SD-NEXT: ret
1360 ; CHECK-GI-LABEL: cos_v2f64:
1361 ; CHECK-GI: // %bb.0: // %entry
1362 ; CHECK-GI-NEXT: sub sp, sp, #32
1363 ; CHECK-GI-NEXT: str d8, [sp, #16] // 8-byte Folded Spill
1364 ; CHECK-GI-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
1365 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 32
1366 ; CHECK-GI-NEXT: .cfi_offset w30, -8
1367 ; CHECK-GI-NEXT: .cfi_offset b8, -16
1368 ; CHECK-GI-NEXT: mov d8, v0.d[1]
1369 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
1370 ; CHECK-GI-NEXT: bl cos
1371 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
1372 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
1373 ; CHECK-GI-NEXT: fmov d0, d8
1374 ; CHECK-GI-NEXT: bl cos
1375 ; CHECK-GI-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1376 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
1377 ; CHECK-GI-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
1378 ; CHECK-GI-NEXT: ldr d8, [sp, #16] // 8-byte Folded Reload
1379 ; CHECK-GI-NEXT: mov v1.d[1], v0.d[0]
1380 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
1381 ; CHECK-GI-NEXT: add sp, sp, #32
1382 ; CHECK-GI-NEXT: ret
1384 %c = call <2 x double> @llvm.cos.v2f64(<2 x double> %a)
1388 define <3 x double> @cos_v3f64(<3 x double> %a) {
1389 ; CHECK-SD-LABEL: cos_v3f64:
1390 ; CHECK-SD: // %bb.0: // %entry
1391 ; CHECK-SD-NEXT: str d10, [sp, #-32]! // 8-byte Folded Spill
1392 ; CHECK-SD-NEXT: stp d9, d8, [sp, #8] // 16-byte Folded Spill
1393 ; CHECK-SD-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
1394 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 32
1395 ; CHECK-SD-NEXT: .cfi_offset w30, -8
1396 ; CHECK-SD-NEXT: .cfi_offset b8, -16
1397 ; CHECK-SD-NEXT: .cfi_offset b9, -24
1398 ; CHECK-SD-NEXT: .cfi_offset b10, -32
1399 ; CHECK-SD-NEXT: fmov d8, d2
1400 ; CHECK-SD-NEXT: fmov d9, d1
1401 ; CHECK-SD-NEXT: bl cos
1402 ; CHECK-SD-NEXT: fmov d10, d0
1403 ; CHECK-SD-NEXT: fmov d0, d9
1404 ; CHECK-SD-NEXT: bl cos
1405 ; CHECK-SD-NEXT: fmov d9, d0
1406 ; CHECK-SD-NEXT: fmov d0, d8
1407 ; CHECK-SD-NEXT: bl cos
1408 ; CHECK-SD-NEXT: fmov d1, d9
1409 ; CHECK-SD-NEXT: ldp d9, d8, [sp, #8] // 16-byte Folded Reload
1410 ; CHECK-SD-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
1411 ; CHECK-SD-NEXT: fmov d2, d0
1412 ; CHECK-SD-NEXT: fmov d0, d10
1413 ; CHECK-SD-NEXT: ldr d10, [sp], #32 // 8-byte Folded Reload
1414 ; CHECK-SD-NEXT: ret
1416 ; CHECK-GI-LABEL: cos_v3f64:
1417 ; CHECK-GI: // %bb.0: // %entry
1418 ; CHECK-GI-NEXT: str d10, [sp, #-32]! // 8-byte Folded Spill
1419 ; CHECK-GI-NEXT: stp d9, d8, [sp, #8] // 16-byte Folded Spill
1420 ; CHECK-GI-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
1421 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 32
1422 ; CHECK-GI-NEXT: .cfi_offset w30, -8
1423 ; CHECK-GI-NEXT: .cfi_offset b8, -16
1424 ; CHECK-GI-NEXT: .cfi_offset b9, -24
1425 ; CHECK-GI-NEXT: .cfi_offset b10, -32
1426 ; CHECK-GI-NEXT: fmov d8, d1
1427 ; CHECK-GI-NEXT: fmov d9, d2
1428 ; CHECK-GI-NEXT: bl cos
1429 ; CHECK-GI-NEXT: fmov d10, d0
1430 ; CHECK-GI-NEXT: fmov d0, d8
1431 ; CHECK-GI-NEXT: bl cos
1432 ; CHECK-GI-NEXT: fmov d8, d0
1433 ; CHECK-GI-NEXT: fmov d0, d9
1434 ; CHECK-GI-NEXT: bl cos
1435 ; CHECK-GI-NEXT: fmov d1, d8
1436 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #8] // 16-byte Folded Reload
1437 ; CHECK-GI-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
1438 ; CHECK-GI-NEXT: fmov d2, d0
1439 ; CHECK-GI-NEXT: fmov d0, d10
1440 ; CHECK-GI-NEXT: ldr d10, [sp], #32 // 8-byte Folded Reload
1441 ; CHECK-GI-NEXT: ret
1443 %c = call <3 x double> @llvm.cos.v3f64(<3 x double> %a)
1447 define <4 x double> @cos_v4f64(<4 x double> %a) {
1448 ; CHECK-SD-LABEL: cos_v4f64:
1449 ; CHECK-SD: // %bb.0: // %entry
1450 ; CHECK-SD-NEXT: sub sp, sp, #64
1451 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
1452 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
1453 ; CHECK-SD-NEXT: .cfi_offset w30, -16
1454 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1455 ; CHECK-SD-NEXT: mov d0, v0.d[1]
1456 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1457 ; CHECK-SD-NEXT: bl cos
1458 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
1459 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1460 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1461 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
1462 ; CHECK-SD-NEXT: bl cos
1463 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1464 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
1465 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
1466 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1467 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
1468 ; CHECK-SD-NEXT: mov d0, v0.d[1]
1469 ; CHECK-SD-NEXT: bl cos
1470 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
1471 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1472 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
1473 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
1474 ; CHECK-SD-NEXT: bl cos
1475 ; CHECK-SD-NEXT: fmov d1, d0
1476 ; CHECK-SD-NEXT: ldp q2, q0, [sp] // 32-byte Folded Reload
1477 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
1478 ; CHECK-SD-NEXT: mov v1.d[1], v2.d[0]
1479 ; CHECK-SD-NEXT: add sp, sp, #64
1480 ; CHECK-SD-NEXT: ret
1482 ; CHECK-GI-LABEL: cos_v4f64:
1483 ; CHECK-GI: // %bb.0: // %entry
1484 ; CHECK-GI-NEXT: sub sp, sp, #80
1485 ; CHECK-GI-NEXT: stp d9, d8, [sp, #48] // 16-byte Folded Spill
1486 ; CHECK-GI-NEXT: str x30, [sp, #64] // 8-byte Folded Spill
1487 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 80
1488 ; CHECK-GI-NEXT: .cfi_offset w30, -16
1489 ; CHECK-GI-NEXT: .cfi_offset b8, -24
1490 ; CHECK-GI-NEXT: .cfi_offset b9, -32
1491 ; CHECK-GI-NEXT: str q1, [sp] // 16-byte Folded Spill
1492 ; CHECK-GI-NEXT: mov d8, v0.d[1]
1493 ; CHECK-GI-NEXT: mov d9, v1.d[1]
1494 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
1495 ; CHECK-GI-NEXT: bl cos
1496 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
1497 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1498 ; CHECK-GI-NEXT: fmov d0, d8
1499 ; CHECK-GI-NEXT: bl cos
1500 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
1501 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1502 ; CHECK-GI-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1503 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
1504 ; CHECK-GI-NEXT: bl cos
1505 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
1506 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
1507 ; CHECK-GI-NEXT: fmov d0, d9
1508 ; CHECK-GI-NEXT: bl cos
1509 ; CHECK-GI-NEXT: ldp q1, q2, [sp, #16] // 32-byte Folded Reload
1510 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
1511 ; CHECK-GI-NEXT: ldr x30, [sp, #64] // 8-byte Folded Reload
1512 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #48] // 16-byte Folded Reload
1513 ; CHECK-GI-NEXT: mov v2.d[1], v1.d[0]
1514 ; CHECK-GI-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1515 ; CHECK-GI-NEXT: mov v1.d[1], v0.d[0]
1516 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
1517 ; CHECK-GI-NEXT: add sp, sp, #80
1518 ; CHECK-GI-NEXT: ret
1520 %c = call <4 x double> @llvm.cos.v4f64(<4 x double> %a)
1524 define <2 x float> @cos_v2f32(<2 x float> %a) {
1525 ; CHECK-SD-LABEL: cos_v2f32:
1526 ; CHECK-SD: // %bb.0: // %entry
1527 ; CHECK-SD-NEXT: sub sp, sp, #48
1528 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
1529 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
1530 ; CHECK-SD-NEXT: .cfi_offset w30, -16
1531 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
1532 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1533 ; CHECK-SD-NEXT: mov s0, v0.s[1]
1534 ; CHECK-SD-NEXT: bl cosf
1535 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1536 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1537 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1538 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
1539 ; CHECK-SD-NEXT: bl cosf
1540 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1541 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1542 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
1543 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
1544 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
1545 ; CHECK-SD-NEXT: add sp, sp, #48
1546 ; CHECK-SD-NEXT: ret
1548 ; CHECK-GI-LABEL: cos_v2f32:
1549 ; CHECK-GI: // %bb.0: // %entry
1550 ; CHECK-GI-NEXT: sub sp, sp, #32
1551 ; CHECK-GI-NEXT: str d8, [sp, #16] // 8-byte Folded Spill
1552 ; CHECK-GI-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
1553 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 32
1554 ; CHECK-GI-NEXT: .cfi_offset w30, -8
1555 ; CHECK-GI-NEXT: .cfi_offset b8, -16
1556 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
1557 ; CHECK-GI-NEXT: mov s8, v0.s[1]
1558 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
1559 ; CHECK-GI-NEXT: bl cosf
1560 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1561 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
1562 ; CHECK-GI-NEXT: fmov s0, s8
1563 ; CHECK-GI-NEXT: bl cosf
1564 ; CHECK-GI-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1565 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1566 ; CHECK-GI-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
1567 ; CHECK-GI-NEXT: ldr d8, [sp, #16] // 8-byte Folded Reload
1568 ; CHECK-GI-NEXT: mov v1.s[1], v0.s[0]
1569 ; CHECK-GI-NEXT: fmov d0, d1
1570 ; CHECK-GI-NEXT: add sp, sp, #32
1571 ; CHECK-GI-NEXT: ret
1573 %c = call <2 x float> @llvm.cos.v2f32(<2 x float> %a)
1577 define <3 x float> @cos_v3f32(<3 x float> %a) {
1578 ; CHECK-SD-LABEL: cos_v3f32:
1579 ; CHECK-SD: // %bb.0: // %entry
1580 ; CHECK-SD-NEXT: sub sp, sp, #48
1581 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
1582 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
1583 ; CHECK-SD-NEXT: .cfi_offset w30, -16
1584 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1585 ; CHECK-SD-NEXT: mov s0, v0.s[1]
1586 ; CHECK-SD-NEXT: bl cosf
1587 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1588 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1589 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1590 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
1591 ; CHECK-SD-NEXT: bl cosf
1592 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1593 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1594 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
1595 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1596 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1597 ; CHECK-SD-NEXT: mov s0, v0.s[2]
1598 ; CHECK-SD-NEXT: bl cosf
1599 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1600 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1601 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
1602 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
1603 ; CHECK-SD-NEXT: mov v0.16b, v1.16b
1604 ; CHECK-SD-NEXT: add sp, sp, #48
1605 ; CHECK-SD-NEXT: ret
1607 ; CHECK-GI-LABEL: cos_v3f32:
1608 ; CHECK-GI: // %bb.0: // %entry
1609 ; CHECK-GI-NEXT: sub sp, sp, #64
1610 ; CHECK-GI-NEXT: stp d9, d8, [sp, #32] // 16-byte Folded Spill
1611 ; CHECK-GI-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
1612 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 64
1613 ; CHECK-GI-NEXT: .cfi_offset w30, -16
1614 ; CHECK-GI-NEXT: .cfi_offset b8, -24
1615 ; CHECK-GI-NEXT: .cfi_offset b9, -32
1616 ; CHECK-GI-NEXT: mov s8, v0.s[1]
1617 ; CHECK-GI-NEXT: mov s9, v0.s[2]
1618 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
1619 ; CHECK-GI-NEXT: bl cosf
1620 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1621 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1622 ; CHECK-GI-NEXT: fmov s0, s8
1623 ; CHECK-GI-NEXT: bl cosf
1624 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1625 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
1626 ; CHECK-GI-NEXT: fmov s0, s9
1627 ; CHECK-GI-NEXT: bl cosf
1628 ; CHECK-GI-NEXT: ldp q2, q1, [sp] // 32-byte Folded Reload
1629 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1630 ; CHECK-GI-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
1631 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #32] // 16-byte Folded Reload
1632 ; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
1633 ; CHECK-GI-NEXT: mov v1.s[2], v0.s[0]
1634 ; CHECK-GI-NEXT: mov v1.s[3], v0.s[0]
1635 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
1636 ; CHECK-GI-NEXT: add sp, sp, #64
1637 ; CHECK-GI-NEXT: ret
1639 %c = call <3 x float> @llvm.cos.v3f32(<3 x float> %a)
1643 define <4 x float> @cos_v4f32(<4 x float> %a) {
1644 ; CHECK-SD-LABEL: cos_v4f32:
1645 ; CHECK-SD: // %bb.0: // %entry
1646 ; CHECK-SD-NEXT: sub sp, sp, #48
1647 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
1648 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
1649 ; CHECK-SD-NEXT: .cfi_offset w30, -16
1650 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1651 ; CHECK-SD-NEXT: mov s0, v0.s[1]
1652 ; CHECK-SD-NEXT: bl cosf
1653 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1654 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1655 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1656 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
1657 ; CHECK-SD-NEXT: bl cosf
1658 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1659 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1660 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
1661 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1662 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1663 ; CHECK-SD-NEXT: mov s0, v0.s[2]
1664 ; CHECK-SD-NEXT: bl cosf
1665 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1666 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1667 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
1668 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1669 ; CHECK-SD-NEXT: mov s0, v0.s[3]
1670 ; CHECK-SD-NEXT: str q1, [sp] // 16-byte Folded Spill
1671 ; CHECK-SD-NEXT: bl cosf
1672 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1673 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1674 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
1675 ; CHECK-SD-NEXT: mov v1.s[3], v0.s[0]
1676 ; CHECK-SD-NEXT: mov v0.16b, v1.16b
1677 ; CHECK-SD-NEXT: add sp, sp, #48
1678 ; CHECK-SD-NEXT: ret
1680 ; CHECK-GI-LABEL: cos_v4f32:
1681 ; CHECK-GI: // %bb.0: // %entry
1682 ; CHECK-GI-NEXT: sub sp, sp, #80
1683 ; CHECK-GI-NEXT: str d10, [sp, #48] // 8-byte Folded Spill
1684 ; CHECK-GI-NEXT: stp d9, d8, [sp, #56] // 16-byte Folded Spill
1685 ; CHECK-GI-NEXT: str x30, [sp, #72] // 8-byte Folded Spill
1686 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 80
1687 ; CHECK-GI-NEXT: .cfi_offset w30, -8
1688 ; CHECK-GI-NEXT: .cfi_offset b8, -16
1689 ; CHECK-GI-NEXT: .cfi_offset b9, -24
1690 ; CHECK-GI-NEXT: .cfi_offset b10, -32
1691 ; CHECK-GI-NEXT: mov s8, v0.s[1]
1692 ; CHECK-GI-NEXT: mov s9, v0.s[2]
1693 ; CHECK-GI-NEXT: mov s10, v0.s[3]
1694 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
1695 ; CHECK-GI-NEXT: bl cosf
1696 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1697 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1698 ; CHECK-GI-NEXT: fmov s0, s8
1699 ; CHECK-GI-NEXT: bl cosf
1700 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1701 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1702 ; CHECK-GI-NEXT: fmov s0, s9
1703 ; CHECK-GI-NEXT: bl cosf
1704 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1705 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
1706 ; CHECK-GI-NEXT: fmov s0, s10
1707 ; CHECK-GI-NEXT: bl cosf
1708 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #16] // 32-byte Folded Reload
1709 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1710 ; CHECK-GI-NEXT: ldr x30, [sp, #72] // 8-byte Folded Reload
1711 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #56] // 16-byte Folded Reload
1712 ; CHECK-GI-NEXT: ldr d10, [sp, #48] // 8-byte Folded Reload
1713 ; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
1714 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
1715 ; CHECK-GI-NEXT: mov v1.s[2], v2.s[0]
1716 ; CHECK-GI-NEXT: mov v1.s[3], v0.s[0]
1717 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
1718 ; CHECK-GI-NEXT: add sp, sp, #80
1719 ; CHECK-GI-NEXT: ret
1721 %c = call <4 x float> @llvm.cos.v4f32(<4 x float> %a)
1725 define <8 x float> @cos_v8f32(<8 x float> %a) {
1726 ; CHECK-SD-LABEL: cos_v8f32:
1727 ; CHECK-SD: // %bb.0: // %entry
1728 ; CHECK-SD-NEXT: sub sp, sp, #64
1729 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
1730 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
1731 ; CHECK-SD-NEXT: .cfi_offset w30, -16
1732 ; CHECK-SD-NEXT: stp q0, q1, [sp] // 32-byte Folded Spill
1733 ; CHECK-SD-NEXT: mov s0, v0.s[1]
1734 ; CHECK-SD-NEXT: bl cosf
1735 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1736 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1737 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1738 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
1739 ; CHECK-SD-NEXT: bl cosf
1740 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1741 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1742 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
1743 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1744 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1745 ; CHECK-SD-NEXT: mov s0, v0.s[2]
1746 ; CHECK-SD-NEXT: bl cosf
1747 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1748 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1749 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
1750 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1751 ; CHECK-SD-NEXT: mov s0, v0.s[3]
1752 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1753 ; CHECK-SD-NEXT: bl cosf
1754 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
1755 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1756 ; CHECK-SD-NEXT: mov v1.s[3], v0.s[0]
1757 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1758 ; CHECK-SD-NEXT: mov s0, v0.s[1]
1759 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1760 ; CHECK-SD-NEXT: bl cosf
1761 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1762 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1763 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1764 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
1765 ; CHECK-SD-NEXT: bl cosf
1766 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1767 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1768 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
1769 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1770 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1771 ; CHECK-SD-NEXT: mov s0, v0.s[2]
1772 ; CHECK-SD-NEXT: bl cosf
1773 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1774 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
1775 ; CHECK-SD-NEXT: mov v1.s[2], v0.s[0]
1776 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1777 ; CHECK-SD-NEXT: mov s0, v0.s[3]
1778 ; CHECK-SD-NEXT: str q1, [sp] // 16-byte Folded Spill
1779 ; CHECK-SD-NEXT: bl cosf
1780 ; CHECK-SD-NEXT: fmov s2, s0
1781 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
1782 ; CHECK-SD-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
1783 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
1784 ; CHECK-SD-NEXT: mov v1.s[3], v2.s[0]
1785 ; CHECK-SD-NEXT: add sp, sp, #64
1786 ; CHECK-SD-NEXT: ret
1788 ; CHECK-GI-LABEL: cos_v8f32:
1789 ; CHECK-GI: // %bb.0: // %entry
1790 ; CHECK-GI-NEXT: sub sp, sp, #176
1791 ; CHECK-GI-NEXT: stp d13, d12, [sp, #112] // 16-byte Folded Spill
1792 ; CHECK-GI-NEXT: stp d11, d10, [sp, #128] // 16-byte Folded Spill
1793 ; CHECK-GI-NEXT: stp d9, d8, [sp, #144] // 16-byte Folded Spill
1794 ; CHECK-GI-NEXT: str x30, [sp, #160] // 8-byte Folded Spill
1795 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 176
1796 ; CHECK-GI-NEXT: .cfi_offset w30, -16
1797 ; CHECK-GI-NEXT: .cfi_offset b8, -24
1798 ; CHECK-GI-NEXT: .cfi_offset b9, -32
1799 ; CHECK-GI-NEXT: .cfi_offset b10, -40
1800 ; CHECK-GI-NEXT: .cfi_offset b11, -48
1801 ; CHECK-GI-NEXT: .cfi_offset b12, -56
1802 ; CHECK-GI-NEXT: .cfi_offset b13, -64
1803 ; CHECK-GI-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
1804 ; CHECK-GI-NEXT: mov s8, v0.s[1]
1805 ; CHECK-GI-NEXT: mov s9, v0.s[2]
1806 ; CHECK-GI-NEXT: mov s10, v0.s[3]
1807 ; CHECK-GI-NEXT: mov s11, v1.s[1]
1808 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
1809 ; CHECK-GI-NEXT: mov s12, v1.s[2]
1810 ; CHECK-GI-NEXT: mov s13, v1.s[3]
1811 ; CHECK-GI-NEXT: bl cosf
1812 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1813 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
1814 ; CHECK-GI-NEXT: fmov s0, s8
1815 ; CHECK-GI-NEXT: bl cosf
1816 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1817 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
1818 ; CHECK-GI-NEXT: fmov s0, s9
1819 ; CHECK-GI-NEXT: bl cosf
1820 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1821 ; CHECK-GI-NEXT: str q0, [sp, #96] // 16-byte Folded Spill
1822 ; CHECK-GI-NEXT: fmov s0, s10
1823 ; CHECK-GI-NEXT: bl cosf
1824 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1825 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
1826 ; CHECK-GI-NEXT: ldr q0, [sp, #32] // 16-byte Folded Reload
1827 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
1828 ; CHECK-GI-NEXT: bl cosf
1829 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1830 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1831 ; CHECK-GI-NEXT: fmov s0, s11
1832 ; CHECK-GI-NEXT: bl cosf
1833 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1834 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1835 ; CHECK-GI-NEXT: fmov s0, s12
1836 ; CHECK-GI-NEXT: bl cosf
1837 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1838 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
1839 ; CHECK-GI-NEXT: fmov s0, s13
1840 ; CHECK-GI-NEXT: bl cosf
1841 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #48] // 32-byte Folded Reload
1842 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
1843 ; CHECK-GI-NEXT: ldr x30, [sp, #160] // 8-byte Folded Reload
1844 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #144] // 16-byte Folded Reload
1845 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #128] // 16-byte Folded Reload
1846 ; CHECK-GI-NEXT: mov v1.s[1], v2.s[0]
1847 ; CHECK-GI-NEXT: ldp q2, q3, [sp, #16] // 32-byte Folded Reload
1848 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #112] // 16-byte Folded Reload
1849 ; CHECK-GI-NEXT: mov v3.s[1], v2.s[0]
1850 ; CHECK-GI-NEXT: ldr q2, [sp, #96] // 16-byte Folded Reload
1851 ; CHECK-GI-NEXT: mov v1.s[2], v2.s[0]
1852 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
1853 ; CHECK-GI-NEXT: mov v3.s[2], v2.s[0]
1854 ; CHECK-GI-NEXT: ldr q2, [sp, #80] // 16-byte Folded Reload
1855 ; CHECK-GI-NEXT: mov v1.s[3], v2.s[0]
1856 ; CHECK-GI-NEXT: mov v3.s[3], v0.s[0]
1857 ; CHECK-GI-NEXT: mov v2.16b, v1.16b
1858 ; CHECK-GI-NEXT: mov v1.16b, v3.16b
1859 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
1860 ; CHECK-GI-NEXT: add sp, sp, #176
1861 ; CHECK-GI-NEXT: ret
1863 %c = call <8 x float> @llvm.cos.v8f32(<8 x float> %a)
1867 define <7 x half> @cos_v7f16(<7 x half> %a) {
1868 ; CHECK-SD-LABEL: cos_v7f16:
1869 ; CHECK-SD: // %bb.0: // %entry
1870 ; CHECK-SD-NEXT: sub sp, sp, #48
1871 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
1872 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
1873 ; CHECK-SD-NEXT: .cfi_offset w30, -16
1874 ; CHECK-SD-NEXT: mov h1, v0.h[1]
1875 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
1876 ; CHECK-SD-NEXT: fcvt s0, h1
1877 ; CHECK-SD-NEXT: bl cosf
1878 ; CHECK-SD-NEXT: fcvt h0, s0
1879 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1880 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1881 ; CHECK-SD-NEXT: fcvt s0, h0
1882 ; CHECK-SD-NEXT: bl cosf
1883 ; CHECK-SD-NEXT: fcvt h0, s0
1884 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1885 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
1886 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1887 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1888 ; CHECK-SD-NEXT: mov h0, v0.h[2]
1889 ; CHECK-SD-NEXT: fcvt s0, h0
1890 ; CHECK-SD-NEXT: bl cosf
1891 ; CHECK-SD-NEXT: fcvt h0, s0
1892 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1893 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
1894 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1895 ; CHECK-SD-NEXT: mov h0, v0.h[3]
1896 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1897 ; CHECK-SD-NEXT: fcvt s0, h0
1898 ; CHECK-SD-NEXT: bl cosf
1899 ; CHECK-SD-NEXT: fcvt h0, s0
1900 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1901 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
1902 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1903 ; CHECK-SD-NEXT: mov h0, v0.h[4]
1904 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1905 ; CHECK-SD-NEXT: fcvt s0, h0
1906 ; CHECK-SD-NEXT: bl cosf
1907 ; CHECK-SD-NEXT: fcvt h0, s0
1908 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1909 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
1910 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1911 ; CHECK-SD-NEXT: mov h0, v0.h[5]
1912 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1913 ; CHECK-SD-NEXT: fcvt s0, h0
1914 ; CHECK-SD-NEXT: bl cosf
1915 ; CHECK-SD-NEXT: fcvt h0, s0
1916 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1917 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
1918 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1919 ; CHECK-SD-NEXT: mov h0, v0.h[6]
1920 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1921 ; CHECK-SD-NEXT: fcvt s0, h0
1922 ; CHECK-SD-NEXT: bl cosf
1923 ; CHECK-SD-NEXT: fcvt h0, s0
1924 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
1925 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
1926 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
1927 ; CHECK-SD-NEXT: mov h0, v0.h[7]
1928 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
1929 ; CHECK-SD-NEXT: fcvt s0, h0
1930 ; CHECK-SD-NEXT: bl cosf
1931 ; CHECK-SD-NEXT: fcvt h1, s0
1932 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
1933 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
1934 ; CHECK-SD-NEXT: mov v0.h[7], v1.h[0]
1935 ; CHECK-SD-NEXT: add sp, sp, #48
1936 ; CHECK-SD-NEXT: ret
1938 ; CHECK-GI-LABEL: cos_v7f16:
1939 ; CHECK-GI: // %bb.0: // %entry
1940 ; CHECK-GI-NEXT: sub sp, sp, #160
1941 ; CHECK-GI-NEXT: stp d13, d12, [sp, #96] // 16-byte Folded Spill
1942 ; CHECK-GI-NEXT: stp d11, d10, [sp, #112] // 16-byte Folded Spill
1943 ; CHECK-GI-NEXT: stp d9, d8, [sp, #128] // 16-byte Folded Spill
1944 ; CHECK-GI-NEXT: str x30, [sp, #144] // 8-byte Folded Spill
1945 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 160
1946 ; CHECK-GI-NEXT: .cfi_offset w30, -16
1947 ; CHECK-GI-NEXT: .cfi_offset b8, -24
1948 ; CHECK-GI-NEXT: .cfi_offset b9, -32
1949 ; CHECK-GI-NEXT: .cfi_offset b10, -40
1950 ; CHECK-GI-NEXT: .cfi_offset b11, -48
1951 ; CHECK-GI-NEXT: .cfi_offset b12, -56
1952 ; CHECK-GI-NEXT: .cfi_offset b13, -64
1953 ; CHECK-GI-NEXT: mov h8, v0.h[1]
1954 ; CHECK-GI-NEXT: mov h9, v0.h[2]
1955 ; CHECK-GI-NEXT: mov h10, v0.h[3]
1956 ; CHECK-GI-NEXT: mov h11, v0.h[4]
1957 ; CHECK-GI-NEXT: mov h12, v0.h[5]
1958 ; CHECK-GI-NEXT: mov h13, v0.h[6]
1959 ; CHECK-GI-NEXT: fcvt s0, h0
1960 ; CHECK-GI-NEXT: bl cosf
1961 ; CHECK-GI-NEXT: fcvt s1, h8
1962 ; CHECK-GI-NEXT: fcvt h0, s0
1963 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
1964 ; CHECK-GI-NEXT: fmov s0, s1
1965 ; CHECK-GI-NEXT: bl cosf
1966 ; CHECK-GI-NEXT: fcvt s1, h9
1967 ; CHECK-GI-NEXT: fcvt h0, s0
1968 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
1969 ; CHECK-GI-NEXT: fmov s0, s1
1970 ; CHECK-GI-NEXT: bl cosf
1971 ; CHECK-GI-NEXT: fcvt s1, h10
1972 ; CHECK-GI-NEXT: fcvt h0, s0
1973 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
1974 ; CHECK-GI-NEXT: fmov s0, s1
1975 ; CHECK-GI-NEXT: bl cosf
1976 ; CHECK-GI-NEXT: fcvt s1, h11
1977 ; CHECK-GI-NEXT: fcvt h0, s0
1978 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
1979 ; CHECK-GI-NEXT: fmov s0, s1
1980 ; CHECK-GI-NEXT: bl cosf
1981 ; CHECK-GI-NEXT: fcvt s1, h12
1982 ; CHECK-GI-NEXT: fcvt h0, s0
1983 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
1984 ; CHECK-GI-NEXT: fmov s0, s1
1985 ; CHECK-GI-NEXT: bl cosf
1986 ; CHECK-GI-NEXT: fcvt s1, h13
1987 ; CHECK-GI-NEXT: fcvt h0, s0
1988 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
1989 ; CHECK-GI-NEXT: fmov s0, s1
1990 ; CHECK-GI-NEXT: bl cosf
1991 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #64] // 32-byte Folded Reload
1992 ; CHECK-GI-NEXT: fcvt h0, s0
1993 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #128] // 16-byte Folded Reload
1994 ; CHECK-GI-NEXT: ldr x30, [sp, #144] // 8-byte Folded Reload
1995 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #112] // 16-byte Folded Reload
1996 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
1997 ; CHECK-GI-NEXT: ldr q2, [sp, #48] // 16-byte Folded Reload
1998 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #96] // 16-byte Folded Reload
1999 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
2000 ; CHECK-GI-NEXT: ldr q2, [sp, #32] // 16-byte Folded Reload
2001 ; CHECK-GI-NEXT: mov v1.h[3], v2.h[0]
2002 ; CHECK-GI-NEXT: ldr q2, [sp, #16] // 16-byte Folded Reload
2003 ; CHECK-GI-NEXT: mov v1.h[4], v2.h[0]
2004 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
2005 ; CHECK-GI-NEXT: mov v1.h[5], v2.h[0]
2006 ; CHECK-GI-NEXT: mov v1.h[6], v0.h[0]
2007 ; CHECK-GI-NEXT: mov v1.h[7], v0.h[0]
2008 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
2009 ; CHECK-GI-NEXT: add sp, sp, #160
2010 ; CHECK-GI-NEXT: ret
2012 %c = call <7 x half> @llvm.cos.v7f16(<7 x half> %a)
2016 define <4 x half> @cos_v4f16(<4 x half> %a) {
2017 ; CHECK-SD-LABEL: cos_v4f16:
2018 ; CHECK-SD: // %bb.0: // %entry
2019 ; CHECK-SD-NEXT: sub sp, sp, #48
2020 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
2021 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
2022 ; CHECK-SD-NEXT: .cfi_offset w30, -16
2023 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
2024 ; CHECK-SD-NEXT: mov h1, v0.h[1]
2025 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
2026 ; CHECK-SD-NEXT: fcvt s0, h1
2027 ; CHECK-SD-NEXT: bl cosf
2028 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2029 ; CHECK-SD-NEXT: fcvt h0, s0
2030 ; CHECK-SD-NEXT: fcvt s1, h1
2031 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
2032 ; CHECK-SD-NEXT: fmov s0, s1
2033 ; CHECK-SD-NEXT: bl cosf
2034 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2035 ; CHECK-SD-NEXT: fcvt h2, s0
2036 ; CHECK-SD-NEXT: mov h1, v1.h[2]
2037 ; CHECK-SD-NEXT: fcvt s0, h1
2038 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
2039 ; CHECK-SD-NEXT: mov v2.h[1], v1.h[0]
2040 ; CHECK-SD-NEXT: str q2, [sp] // 16-byte Folded Spill
2041 ; CHECK-SD-NEXT: bl cosf
2042 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2043 ; CHECK-SD-NEXT: fcvt h2, s0
2044 ; CHECK-SD-NEXT: mov h1, v1.h[3]
2045 ; CHECK-SD-NEXT: fcvt s0, h1
2046 ; CHECK-SD-NEXT: ldr q1, [sp] // 16-byte Folded Reload
2047 ; CHECK-SD-NEXT: mov v1.h[2], v2.h[0]
2048 ; CHECK-SD-NEXT: str q1, [sp] // 16-byte Folded Spill
2049 ; CHECK-SD-NEXT: bl cosf
2050 ; CHECK-SD-NEXT: fcvt h1, s0
2051 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2052 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
2053 ; CHECK-SD-NEXT: mov v0.h[3], v1.h[0]
2054 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
2055 ; CHECK-SD-NEXT: add sp, sp, #48
2056 ; CHECK-SD-NEXT: ret
2058 ; CHECK-GI-LABEL: cos_v4f16:
2059 ; CHECK-GI: // %bb.0: // %entry
2060 ; CHECK-GI-NEXT: sub sp, sp, #80
2061 ; CHECK-GI-NEXT: str d10, [sp, #48] // 8-byte Folded Spill
2062 ; CHECK-GI-NEXT: stp d9, d8, [sp, #56] // 16-byte Folded Spill
2063 ; CHECK-GI-NEXT: str x30, [sp, #72] // 8-byte Folded Spill
2064 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 80
2065 ; CHECK-GI-NEXT: .cfi_offset w30, -8
2066 ; CHECK-GI-NEXT: .cfi_offset b8, -16
2067 ; CHECK-GI-NEXT: .cfi_offset b9, -24
2068 ; CHECK-GI-NEXT: .cfi_offset b10, -32
2069 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
2070 ; CHECK-GI-NEXT: mov h8, v0.h[1]
2071 ; CHECK-GI-NEXT: mov h9, v0.h[2]
2072 ; CHECK-GI-NEXT: mov h10, v0.h[3]
2073 ; CHECK-GI-NEXT: fcvt s0, h0
2074 ; CHECK-GI-NEXT: bl cosf
2075 ; CHECK-GI-NEXT: fcvt s1, h8
2076 ; CHECK-GI-NEXT: fcvt h0, s0
2077 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
2078 ; CHECK-GI-NEXT: fmov s0, s1
2079 ; CHECK-GI-NEXT: bl cosf
2080 ; CHECK-GI-NEXT: fcvt s1, h9
2081 ; CHECK-GI-NEXT: fcvt h0, s0
2082 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
2083 ; CHECK-GI-NEXT: fmov s0, s1
2084 ; CHECK-GI-NEXT: bl cosf
2085 ; CHECK-GI-NEXT: fcvt s1, h10
2086 ; CHECK-GI-NEXT: fcvt h0, s0
2087 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
2088 ; CHECK-GI-NEXT: fmov s0, s1
2089 ; CHECK-GI-NEXT: bl cosf
2090 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #16] // 32-byte Folded Reload
2091 ; CHECK-GI-NEXT: fcvt h0, s0
2092 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #56] // 16-byte Folded Reload
2093 ; CHECK-GI-NEXT: ldr x30, [sp, #72] // 8-byte Folded Reload
2094 ; CHECK-GI-NEXT: ldr d10, [sp, #48] // 8-byte Folded Reload
2095 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
2096 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
2097 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
2098 ; CHECK-GI-NEXT: mov v1.h[3], v0.h[0]
2099 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
2100 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
2101 ; CHECK-GI-NEXT: add sp, sp, #80
2102 ; CHECK-GI-NEXT: ret
2104 %c = call <4 x half> @llvm.cos.v4f16(<4 x half> %a)
2108 define <8 x half> @cos_v8f16(<8 x half> %a) {
2109 ; CHECK-SD-LABEL: cos_v8f16:
2110 ; CHECK-SD: // %bb.0: // %entry
2111 ; CHECK-SD-NEXT: sub sp, sp, #48
2112 ; CHECK-SD-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
2113 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
2114 ; CHECK-SD-NEXT: .cfi_offset w30, -16
2115 ; CHECK-SD-NEXT: mov h1, v0.h[1]
2116 ; CHECK-SD-NEXT: str q0, [sp] // 16-byte Folded Spill
2117 ; CHECK-SD-NEXT: fcvt s0, h1
2118 ; CHECK-SD-NEXT: bl cosf
2119 ; CHECK-SD-NEXT: fcvt h0, s0
2120 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
2121 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2122 ; CHECK-SD-NEXT: fcvt s0, h0
2123 ; CHECK-SD-NEXT: bl cosf
2124 ; CHECK-SD-NEXT: fcvt h0, s0
2125 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2126 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
2127 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
2128 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2129 ; CHECK-SD-NEXT: mov h0, v0.h[2]
2130 ; CHECK-SD-NEXT: fcvt s0, h0
2131 ; CHECK-SD-NEXT: bl cosf
2132 ; CHECK-SD-NEXT: fcvt h0, s0
2133 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2134 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
2135 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2136 ; CHECK-SD-NEXT: mov h0, v0.h[3]
2137 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2138 ; CHECK-SD-NEXT: fcvt s0, h0
2139 ; CHECK-SD-NEXT: bl cosf
2140 ; CHECK-SD-NEXT: fcvt h0, s0
2141 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2142 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
2143 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2144 ; CHECK-SD-NEXT: mov h0, v0.h[4]
2145 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2146 ; CHECK-SD-NEXT: fcvt s0, h0
2147 ; CHECK-SD-NEXT: bl cosf
2148 ; CHECK-SD-NEXT: fcvt h0, s0
2149 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2150 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
2151 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2152 ; CHECK-SD-NEXT: mov h0, v0.h[5]
2153 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2154 ; CHECK-SD-NEXT: fcvt s0, h0
2155 ; CHECK-SD-NEXT: bl cosf
2156 ; CHECK-SD-NEXT: fcvt h0, s0
2157 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2158 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
2159 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2160 ; CHECK-SD-NEXT: mov h0, v0.h[6]
2161 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2162 ; CHECK-SD-NEXT: fcvt s0, h0
2163 ; CHECK-SD-NEXT: bl cosf
2164 ; CHECK-SD-NEXT: fcvt h0, s0
2165 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2166 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
2167 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2168 ; CHECK-SD-NEXT: mov h0, v0.h[7]
2169 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2170 ; CHECK-SD-NEXT: fcvt s0, h0
2171 ; CHECK-SD-NEXT: bl cosf
2172 ; CHECK-SD-NEXT: fcvt h1, s0
2173 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
2174 ; CHECK-SD-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
2175 ; CHECK-SD-NEXT: mov v0.h[7], v1.h[0]
2176 ; CHECK-SD-NEXT: add sp, sp, #48
2177 ; CHECK-SD-NEXT: ret
2179 ; CHECK-GI-LABEL: cos_v8f16:
2180 ; CHECK-GI: // %bb.0: // %entry
2181 ; CHECK-GI-NEXT: sub sp, sp, #176
2182 ; CHECK-GI-NEXT: str d14, [sp, #112] // 8-byte Folded Spill
2183 ; CHECK-GI-NEXT: stp d13, d12, [sp, #120] // 16-byte Folded Spill
2184 ; CHECK-GI-NEXT: stp d11, d10, [sp, #136] // 16-byte Folded Spill
2185 ; CHECK-GI-NEXT: stp d9, d8, [sp, #152] // 16-byte Folded Spill
2186 ; CHECK-GI-NEXT: str x30, [sp, #168] // 8-byte Folded Spill
2187 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 176
2188 ; CHECK-GI-NEXT: .cfi_offset w30, -8
2189 ; CHECK-GI-NEXT: .cfi_offset b8, -16
2190 ; CHECK-GI-NEXT: .cfi_offset b9, -24
2191 ; CHECK-GI-NEXT: .cfi_offset b10, -32
2192 ; CHECK-GI-NEXT: .cfi_offset b11, -40
2193 ; CHECK-GI-NEXT: .cfi_offset b12, -48
2194 ; CHECK-GI-NEXT: .cfi_offset b13, -56
2195 ; CHECK-GI-NEXT: .cfi_offset b14, -64
2196 ; CHECK-GI-NEXT: mov h8, v0.h[1]
2197 ; CHECK-GI-NEXT: mov h9, v0.h[2]
2198 ; CHECK-GI-NEXT: mov h10, v0.h[3]
2199 ; CHECK-GI-NEXT: mov h11, v0.h[4]
2200 ; CHECK-GI-NEXT: mov h12, v0.h[5]
2201 ; CHECK-GI-NEXT: mov h13, v0.h[6]
2202 ; CHECK-GI-NEXT: mov h14, v0.h[7]
2203 ; CHECK-GI-NEXT: fcvt s0, h0
2204 ; CHECK-GI-NEXT: bl cosf
2205 ; CHECK-GI-NEXT: fcvt s1, h8
2206 ; CHECK-GI-NEXT: fcvt h0, s0
2207 ; CHECK-GI-NEXT: str q0, [sp, #96] // 16-byte Folded Spill
2208 ; CHECK-GI-NEXT: fmov s0, s1
2209 ; CHECK-GI-NEXT: bl cosf
2210 ; CHECK-GI-NEXT: fcvt s1, h9
2211 ; CHECK-GI-NEXT: fcvt h0, s0
2212 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
2213 ; CHECK-GI-NEXT: fmov s0, s1
2214 ; CHECK-GI-NEXT: bl cosf
2215 ; CHECK-GI-NEXT: fcvt s1, h10
2216 ; CHECK-GI-NEXT: fcvt h0, s0
2217 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
2218 ; CHECK-GI-NEXT: fmov s0, s1
2219 ; CHECK-GI-NEXT: bl cosf
2220 ; CHECK-GI-NEXT: fcvt s1, h11
2221 ; CHECK-GI-NEXT: fcvt h0, s0
2222 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
2223 ; CHECK-GI-NEXT: fmov s0, s1
2224 ; CHECK-GI-NEXT: bl cosf
2225 ; CHECK-GI-NEXT: fcvt s1, h12
2226 ; CHECK-GI-NEXT: fcvt h0, s0
2227 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
2228 ; CHECK-GI-NEXT: fmov s0, s1
2229 ; CHECK-GI-NEXT: bl cosf
2230 ; CHECK-GI-NEXT: fcvt s1, h13
2231 ; CHECK-GI-NEXT: fcvt h0, s0
2232 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
2233 ; CHECK-GI-NEXT: fmov s0, s1
2234 ; CHECK-GI-NEXT: bl cosf
2235 ; CHECK-GI-NEXT: fcvt s1, h14
2236 ; CHECK-GI-NEXT: fcvt h0, s0
2237 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
2238 ; CHECK-GI-NEXT: fmov s0, s1
2239 ; CHECK-GI-NEXT: bl cosf
2240 ; CHECK-GI-NEXT: ldp q2, q1, [sp, #80] // 32-byte Folded Reload
2241 ; CHECK-GI-NEXT: fcvt h0, s0
2242 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #152] // 16-byte Folded Reload
2243 ; CHECK-GI-NEXT: ldr x30, [sp, #168] // 8-byte Folded Reload
2244 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #136] // 16-byte Folded Reload
2245 ; CHECK-GI-NEXT: ldr d14, [sp, #112] // 8-byte Folded Reload
2246 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
2247 ; CHECK-GI-NEXT: ldr q2, [sp, #64] // 16-byte Folded Reload
2248 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #120] // 16-byte Folded Reload
2249 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
2250 ; CHECK-GI-NEXT: ldr q2, [sp, #48] // 16-byte Folded Reload
2251 ; CHECK-GI-NEXT: mov v1.h[3], v2.h[0]
2252 ; CHECK-GI-NEXT: ldr q2, [sp, #32] // 16-byte Folded Reload
2253 ; CHECK-GI-NEXT: mov v1.h[4], v2.h[0]
2254 ; CHECK-GI-NEXT: ldr q2, [sp, #16] // 16-byte Folded Reload
2255 ; CHECK-GI-NEXT: mov v1.h[5], v2.h[0]
2256 ; CHECK-GI-NEXT: ldr q2, [sp] // 16-byte Folded Reload
2257 ; CHECK-GI-NEXT: mov v1.h[6], v2.h[0]
2258 ; CHECK-GI-NEXT: mov v1.h[7], v0.h[0]
2259 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
2260 ; CHECK-GI-NEXT: add sp, sp, #176
2261 ; CHECK-GI-NEXT: ret
2263 %c = call <8 x half> @llvm.cos.v8f16(<8 x half> %a)
2267 define <16 x half> @cos_v16f16(<16 x half> %a) {
2268 ; CHECK-SD-LABEL: cos_v16f16:
2269 ; CHECK-SD: // %bb.0: // %entry
2270 ; CHECK-SD-NEXT: sub sp, sp, #64
2271 ; CHECK-SD-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
2272 ; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
2273 ; CHECK-SD-NEXT: .cfi_offset w30, -16
2274 ; CHECK-SD-NEXT: stp q1, q0, [sp] // 32-byte Folded Spill
2275 ; CHECK-SD-NEXT: mov h1, v0.h[1]
2276 ; CHECK-SD-NEXT: fcvt s0, h1
2277 ; CHECK-SD-NEXT: bl cosf
2278 ; CHECK-SD-NEXT: fcvt h0, s0
2279 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
2280 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
2281 ; CHECK-SD-NEXT: fcvt s0, h0
2282 ; CHECK-SD-NEXT: bl cosf
2283 ; CHECK-SD-NEXT: fcvt h0, s0
2284 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
2285 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
2286 ; CHECK-SD-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
2287 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
2288 ; CHECK-SD-NEXT: mov h0, v0.h[2]
2289 ; CHECK-SD-NEXT: fcvt s0, h0
2290 ; CHECK-SD-NEXT: bl cosf
2291 ; CHECK-SD-NEXT: fcvt h0, s0
2292 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
2293 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
2294 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
2295 ; CHECK-SD-NEXT: mov h0, v0.h[3]
2296 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
2297 ; CHECK-SD-NEXT: fcvt s0, h0
2298 ; CHECK-SD-NEXT: bl cosf
2299 ; CHECK-SD-NEXT: fcvt h0, s0
2300 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
2301 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
2302 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
2303 ; CHECK-SD-NEXT: mov h0, v0.h[4]
2304 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
2305 ; CHECK-SD-NEXT: fcvt s0, h0
2306 ; CHECK-SD-NEXT: bl cosf
2307 ; CHECK-SD-NEXT: fcvt h0, s0
2308 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
2309 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
2310 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
2311 ; CHECK-SD-NEXT: mov h0, v0.h[5]
2312 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
2313 ; CHECK-SD-NEXT: fcvt s0, h0
2314 ; CHECK-SD-NEXT: bl cosf
2315 ; CHECK-SD-NEXT: fcvt h0, s0
2316 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
2317 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
2318 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
2319 ; CHECK-SD-NEXT: mov h0, v0.h[6]
2320 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
2321 ; CHECK-SD-NEXT: fcvt s0, h0
2322 ; CHECK-SD-NEXT: bl cosf
2323 ; CHECK-SD-NEXT: fcvt h0, s0
2324 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
2325 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
2326 ; CHECK-SD-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
2327 ; CHECK-SD-NEXT: mov h0, v0.h[7]
2328 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
2329 ; CHECK-SD-NEXT: fcvt s0, h0
2330 ; CHECK-SD-NEXT: bl cosf
2331 ; CHECK-SD-NEXT: fcvt h0, s0
2332 ; CHECK-SD-NEXT: ldr q1, [sp, #32] // 16-byte Folded Reload
2333 ; CHECK-SD-NEXT: mov v1.h[7], v0.h[0]
2334 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2335 ; CHECK-SD-NEXT: mov h0, v0.h[1]
2336 ; CHECK-SD-NEXT: str q1, [sp, #32] // 16-byte Folded Spill
2337 ; CHECK-SD-NEXT: fcvt s0, h0
2338 ; CHECK-SD-NEXT: bl cosf
2339 ; CHECK-SD-NEXT: fcvt h0, s0
2340 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
2341 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2342 ; CHECK-SD-NEXT: fcvt s0, h0
2343 ; CHECK-SD-NEXT: bl cosf
2344 ; CHECK-SD-NEXT: fcvt h0, s0
2345 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2346 ; CHECK-SD-NEXT: mov v0.h[1], v1.h[0]
2347 ; CHECK-SD-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
2348 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2349 ; CHECK-SD-NEXT: mov h0, v0.h[2]
2350 ; CHECK-SD-NEXT: fcvt s0, h0
2351 ; CHECK-SD-NEXT: bl cosf
2352 ; CHECK-SD-NEXT: fcvt h0, s0
2353 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2354 ; CHECK-SD-NEXT: mov v1.h[2], v0.h[0]
2355 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2356 ; CHECK-SD-NEXT: mov h0, v0.h[3]
2357 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2358 ; CHECK-SD-NEXT: fcvt s0, h0
2359 ; CHECK-SD-NEXT: bl cosf
2360 ; CHECK-SD-NEXT: fcvt h0, s0
2361 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2362 ; CHECK-SD-NEXT: mov v1.h[3], v0.h[0]
2363 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2364 ; CHECK-SD-NEXT: mov h0, v0.h[4]
2365 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2366 ; CHECK-SD-NEXT: fcvt s0, h0
2367 ; CHECK-SD-NEXT: bl cosf
2368 ; CHECK-SD-NEXT: fcvt h0, s0
2369 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2370 ; CHECK-SD-NEXT: mov v1.h[4], v0.h[0]
2371 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2372 ; CHECK-SD-NEXT: mov h0, v0.h[5]
2373 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2374 ; CHECK-SD-NEXT: fcvt s0, h0
2375 ; CHECK-SD-NEXT: bl cosf
2376 ; CHECK-SD-NEXT: fcvt h0, s0
2377 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2378 ; CHECK-SD-NEXT: mov v1.h[5], v0.h[0]
2379 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2380 ; CHECK-SD-NEXT: mov h0, v0.h[6]
2381 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2382 ; CHECK-SD-NEXT: fcvt s0, h0
2383 ; CHECK-SD-NEXT: bl cosf
2384 ; CHECK-SD-NEXT: fcvt h0, s0
2385 ; CHECK-SD-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
2386 ; CHECK-SD-NEXT: mov v1.h[6], v0.h[0]
2387 ; CHECK-SD-NEXT: ldr q0, [sp] // 16-byte Folded Reload
2388 ; CHECK-SD-NEXT: mov h0, v0.h[7]
2389 ; CHECK-SD-NEXT: str q1, [sp, #16] // 16-byte Folded Spill
2390 ; CHECK-SD-NEXT: fcvt s0, h0
2391 ; CHECK-SD-NEXT: bl cosf
2392 ; CHECK-SD-NEXT: fmov s1, s0
2393 ; CHECK-SD-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
2394 ; CHECK-SD-NEXT: fcvt h2, s1
2395 ; CHECK-SD-NEXT: ldp q1, q0, [sp, #16] // 32-byte Folded Reload
2396 ; CHECK-SD-NEXT: mov v1.h[7], v2.h[0]
2397 ; CHECK-SD-NEXT: add sp, sp, #64
2398 ; CHECK-SD-NEXT: ret
2400 ; CHECK-GI-LABEL: cos_v16f16:
2401 ; CHECK-GI: // %bb.0: // %entry
2402 ; CHECK-GI-NEXT: sub sp, sp, #320
2403 ; CHECK-GI-NEXT: stp d15, d14, [sp, #240] // 16-byte Folded Spill
2404 ; CHECK-GI-NEXT: stp d13, d12, [sp, #256] // 16-byte Folded Spill
2405 ; CHECK-GI-NEXT: stp d11, d10, [sp, #272] // 16-byte Folded Spill
2406 ; CHECK-GI-NEXT: stp d9, d8, [sp, #288] // 16-byte Folded Spill
2407 ; CHECK-GI-NEXT: stp x29, x30, [sp, #304] // 16-byte Folded Spill
2408 ; CHECK-GI-NEXT: .cfi_def_cfa_offset 320
2409 ; CHECK-GI-NEXT: .cfi_offset w30, -8
2410 ; CHECK-GI-NEXT: .cfi_offset w29, -16
2411 ; CHECK-GI-NEXT: .cfi_offset b8, -24
2412 ; CHECK-GI-NEXT: .cfi_offset b9, -32
2413 ; CHECK-GI-NEXT: .cfi_offset b10, -40
2414 ; CHECK-GI-NEXT: .cfi_offset b11, -48
2415 ; CHECK-GI-NEXT: .cfi_offset b12, -56
2416 ; CHECK-GI-NEXT: .cfi_offset b13, -64
2417 ; CHECK-GI-NEXT: .cfi_offset b14, -72
2418 ; CHECK-GI-NEXT: .cfi_offset b15, -80
2419 ; CHECK-GI-NEXT: mov v2.16b, v1.16b
2420 ; CHECK-GI-NEXT: str q1, [sp, #80] // 16-byte Folded Spill
2421 ; CHECK-GI-NEXT: mov h14, v1.h[1]
2422 ; CHECK-GI-NEXT: mov h1, v1.h[2]
2423 ; CHECK-GI-NEXT: mov h15, v0.h[1]
2424 ; CHECK-GI-NEXT: mov h8, v0.h[2]
2425 ; CHECK-GI-NEXT: mov h9, v0.h[3]
2426 ; CHECK-GI-NEXT: mov h10, v0.h[4]
2427 ; CHECK-GI-NEXT: mov h11, v0.h[5]
2428 ; CHECK-GI-NEXT: mov h12, v0.h[6]
2429 ; CHECK-GI-NEXT: mov h13, v0.h[7]
2430 ; CHECK-GI-NEXT: fcvt s0, h0
2431 ; CHECK-GI-NEXT: str h1, [sp, #16] // 2-byte Folded Spill
2432 ; CHECK-GI-NEXT: mov h1, v2.h[3]
2433 ; CHECK-GI-NEXT: str h1, [sp, #32] // 2-byte Folded Spill
2434 ; CHECK-GI-NEXT: mov h1, v2.h[4]
2435 ; CHECK-GI-NEXT: str h1, [sp, #48] // 2-byte Folded Spill
2436 ; CHECK-GI-NEXT: mov h1, v2.h[5]
2437 ; CHECK-GI-NEXT: str h1, [sp, #64] // 2-byte Folded Spill
2438 ; CHECK-GI-NEXT: mov h1, v2.h[6]
2439 ; CHECK-GI-NEXT: str h1, [sp, #96] // 2-byte Folded Spill
2440 ; CHECK-GI-NEXT: mov h1, v2.h[7]
2441 ; CHECK-GI-NEXT: str h1, [sp, #160] // 2-byte Folded Spill
2442 ; CHECK-GI-NEXT: bl cosf
2443 ; CHECK-GI-NEXT: fcvt s1, h15
2444 ; CHECK-GI-NEXT: fcvt h0, s0
2445 ; CHECK-GI-NEXT: str q0, [sp, #192] // 16-byte Folded Spill
2446 ; CHECK-GI-NEXT: fmov s0, s1
2447 ; CHECK-GI-NEXT: bl cosf
2448 ; CHECK-GI-NEXT: fcvt s1, h8
2449 ; CHECK-GI-NEXT: fcvt h0, s0
2450 ; CHECK-GI-NEXT: str q0, [sp, #128] // 16-byte Folded Spill
2451 ; CHECK-GI-NEXT: fmov s0, s1
2452 ; CHECK-GI-NEXT: bl cosf
2453 ; CHECK-GI-NEXT: fcvt s1, h9
2454 ; CHECK-GI-NEXT: fcvt h0, s0
2455 ; CHECK-GI-NEXT: str q0, [sp, #224] // 16-byte Folded Spill
2456 ; CHECK-GI-NEXT: fmov s0, s1
2457 ; CHECK-GI-NEXT: bl cosf
2458 ; CHECK-GI-NEXT: fcvt s1, h10
2459 ; CHECK-GI-NEXT: fcvt h0, s0
2460 ; CHECK-GI-NEXT: str q0, [sp, #208] // 16-byte Folded Spill
2461 ; CHECK-GI-NEXT: fmov s0, s1
2462 ; CHECK-GI-NEXT: bl cosf
2463 ; CHECK-GI-NEXT: fcvt s1, h11
2464 ; CHECK-GI-NEXT: fcvt h0, s0
2465 ; CHECK-GI-NEXT: str q0, [sp, #176] // 16-byte Folded Spill
2466 ; CHECK-GI-NEXT: fmov s0, s1
2467 ; CHECK-GI-NEXT: bl cosf
2468 ; CHECK-GI-NEXT: fcvt s1, h12
2469 ; CHECK-GI-NEXT: fcvt h0, s0
2470 ; CHECK-GI-NEXT: str q0, [sp, #144] // 16-byte Folded Spill
2471 ; CHECK-GI-NEXT: fmov s0, s1
2472 ; CHECK-GI-NEXT: bl cosf
2473 ; CHECK-GI-NEXT: fcvt s1, h13
2474 ; CHECK-GI-NEXT: fcvt h0, s0
2475 ; CHECK-GI-NEXT: str q0, [sp, #112] // 16-byte Folded Spill
2476 ; CHECK-GI-NEXT: fmov s0, s1
2477 ; CHECK-GI-NEXT: bl cosf
2478 ; CHECK-GI-NEXT: ldr q1, [sp, #80] // 16-byte Folded Reload
2479 ; CHECK-GI-NEXT: fcvt h0, s0
2480 ; CHECK-GI-NEXT: fcvt s1, h1
2481 ; CHECK-GI-NEXT: str q0, [sp, #80] // 16-byte Folded Spill
2482 ; CHECK-GI-NEXT: fmov s0, s1
2483 ; CHECK-GI-NEXT: bl cosf
2484 ; CHECK-GI-NEXT: fcvt s1, h14
2485 ; CHECK-GI-NEXT: fcvt h0, s0
2486 ; CHECK-GI-NEXT: str q0, [sp] // 16-byte Folded Spill
2487 ; CHECK-GI-NEXT: fmov s0, s1
2488 ; CHECK-GI-NEXT: bl cosf
2489 ; CHECK-GI-NEXT: ldr h1, [sp, #16] // 2-byte Folded Reload
2490 ; CHECK-GI-NEXT: fcvt h0, s0
2491 ; CHECK-GI-NEXT: fcvt s1, h1
2492 ; CHECK-GI-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
2493 ; CHECK-GI-NEXT: fmov s0, s1
2494 ; CHECK-GI-NEXT: bl cosf
2495 ; CHECK-GI-NEXT: ldr h1, [sp, #32] // 2-byte Folded Reload
2496 ; CHECK-GI-NEXT: fcvt h0, s0
2497 ; CHECK-GI-NEXT: fcvt s1, h1
2498 ; CHECK-GI-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
2499 ; CHECK-GI-NEXT: fmov s0, s1
2500 ; CHECK-GI-NEXT: bl cosf
2501 ; CHECK-GI-NEXT: ldr h1, [sp, #48] // 2-byte Folded Reload
2502 ; CHECK-GI-NEXT: fcvt h0, s0
2503 ; CHECK-GI-NEXT: fcvt s1, h1
2504 ; CHECK-GI-NEXT: str q0, [sp, #48] // 16-byte Folded Spill
2505 ; CHECK-GI-NEXT: fmov s0, s1
2506 ; CHECK-GI-NEXT: bl cosf
2507 ; CHECK-GI-NEXT: ldr h1, [sp, #64] // 2-byte Folded Reload
2508 ; CHECK-GI-NEXT: fcvt h0, s0
2509 ; CHECK-GI-NEXT: fcvt s1, h1
2510 ; CHECK-GI-NEXT: str q0, [sp, #64] // 16-byte Folded Spill
2511 ; CHECK-GI-NEXT: fmov s0, s1
2512 ; CHECK-GI-NEXT: bl cosf
2513 ; CHECK-GI-NEXT: ldr h1, [sp, #96] // 2-byte Folded Reload
2514 ; CHECK-GI-NEXT: fcvt h0, s0
2515 ; CHECK-GI-NEXT: fcvt s1, h1
2516 ; CHECK-GI-NEXT: str q0, [sp, #96] // 16-byte Folded Spill
2517 ; CHECK-GI-NEXT: fmov s0, s1
2518 ; CHECK-GI-NEXT: bl cosf
2519 ; CHECK-GI-NEXT: ldr h1, [sp, #160] // 2-byte Folded Reload
2520 ; CHECK-GI-NEXT: fcvt h0, s0
2521 ; CHECK-GI-NEXT: fcvt s1, h1
2522 ; CHECK-GI-NEXT: str q0, [sp, #160] // 16-byte Folded Spill
2523 ; CHECK-GI-NEXT: fmov s0, s1
2524 ; CHECK-GI-NEXT: bl cosf
2525 ; CHECK-GI-NEXT: ldr q3, [sp, #192] // 16-byte Folded Reload
2526 ; CHECK-GI-NEXT: ldr q2, [sp, #128] // 16-byte Folded Reload
2527 ; CHECK-GI-NEXT: ldp x29, x30, [sp, #304] // 16-byte Folded Reload
2528 ; CHECK-GI-NEXT: mov v3.h[1], v2.h[0]
2529 ; CHECK-GI-NEXT: ldp q1, q2, [sp] // 32-byte Folded Reload
2530 ; CHECK-GI-NEXT: ldp d9, d8, [sp, #288] // 16-byte Folded Reload
2531 ; CHECK-GI-NEXT: ldp d11, d10, [sp, #272] // 16-byte Folded Reload
2532 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
2533 ; CHECK-GI-NEXT: ldr q2, [sp, #224] // 16-byte Folded Reload
2534 ; CHECK-GI-NEXT: ldp d13, d12, [sp, #256] // 16-byte Folded Reload
2535 ; CHECK-GI-NEXT: mov v3.h[2], v2.h[0]
2536 ; CHECK-GI-NEXT: ldr q2, [sp, #32] // 16-byte Folded Reload
2537 ; CHECK-GI-NEXT: ldp d15, d14, [sp, #240] // 16-byte Folded Reload
2538 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
2539 ; CHECK-GI-NEXT: ldr q2, [sp, #208] // 16-byte Folded Reload
2540 ; CHECK-GI-NEXT: mov v3.h[3], v2.h[0]
2541 ; CHECK-GI-NEXT: ldr q2, [sp, #48] // 16-byte Folded Reload
2542 ; CHECK-GI-NEXT: mov v1.h[3], v2.h[0]
2543 ; CHECK-GI-NEXT: ldr q2, [sp, #176] // 16-byte Folded Reload
2544 ; CHECK-GI-NEXT: mov v3.h[4], v2.h[0]
2545 ; CHECK-GI-NEXT: ldr q2, [sp, #64] // 16-byte Folded Reload
2546 ; CHECK-GI-NEXT: mov v1.h[4], v2.h[0]
2547 ; CHECK-GI-NEXT: ldr q2, [sp, #144] // 16-byte Folded Reload
2548 ; CHECK-GI-NEXT: mov v3.h[5], v2.h[0]
2549 ; CHECK-GI-NEXT: ldr q2, [sp, #96] // 16-byte Folded Reload
2550 ; CHECK-GI-NEXT: mov v1.h[5], v2.h[0]
2551 ; CHECK-GI-NEXT: fcvt h2, s0
2552 ; CHECK-GI-NEXT: ldr q0, [sp, #112] // 16-byte Folded Reload
2553 ; CHECK-GI-NEXT: mov v3.h[6], v0.h[0]
2554 ; CHECK-GI-NEXT: ldr q0, [sp, #160] // 16-byte Folded Reload
2555 ; CHECK-GI-NEXT: mov v1.h[6], v0.h[0]
2556 ; CHECK-GI-NEXT: ldr q0, [sp, #80] // 16-byte Folded Reload
2557 ; CHECK-GI-NEXT: mov v3.h[7], v0.h[0]
2558 ; CHECK-GI-NEXT: mov v1.h[7], v2.h[0]
2559 ; CHECK-GI-NEXT: mov v0.16b, v3.16b
2560 ; CHECK-GI-NEXT: add sp, sp, #320
2561 ; CHECK-GI-NEXT: ret
2563 %c = call <16 x half> @llvm.cos.v16f16(<16 x half> %a)
2567 declare <16 x half> @llvm.cos.v16f16(<16 x half>)
2568 declare <16 x half> @llvm.sin.v16f16(<16 x half>)
2569 declare <2 x double> @llvm.cos.v2f64(<2 x double>)
2570 declare <2 x double> @llvm.sin.v2f64(<2 x double>)
2571 declare <2 x float> @llvm.cos.v2f32(<2 x float>)
2572 declare <2 x float> @llvm.sin.v2f32(<2 x float>)
2573 declare <3 x double> @llvm.cos.v3f64(<3 x double>)
2574 declare <3 x double> @llvm.sin.v3f64(<3 x double>)
2575 declare <3 x float> @llvm.cos.v3f32(<3 x float>)
2576 declare <3 x float> @llvm.sin.v3f32(<3 x float>)
2577 declare <4 x double> @llvm.cos.v4f64(<4 x double>)
2578 declare <4 x double> @llvm.sin.v4f64(<4 x double>)
2579 declare <4 x float> @llvm.cos.v4f32(<4 x float>)
2580 declare <4 x float> @llvm.sin.v4f32(<4 x float>)
2581 declare <4 x half> @llvm.cos.v4f16(<4 x half>)
2582 declare <4 x half> @llvm.sin.v4f16(<4 x half>)
2583 declare <7 x half> @llvm.cos.v7f16(<7 x half>)
2584 declare <7 x half> @llvm.sin.v7f16(<7 x half>)
2585 declare <8 x float> @llvm.cos.v8f32(<8 x float>)
2586 declare <8 x float> @llvm.sin.v8f32(<8 x float>)
2587 declare <8 x half> @llvm.cos.v8f16(<8 x half>)
2588 declare <8 x half> @llvm.sin.v8f16(<8 x half>)
2589 declare double @llvm.cos.f64(double)
2590 declare double @llvm.sin.f64(double)
2591 declare float @llvm.cos.f32(float)
2592 declare float @llvm.sin.f32(float)
2593 declare half @llvm.cos.f16(half)
2594 declare half @llvm.sin.f16(half)