1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-- | FileCheck %s
4 ; PR38527 - https://bugs.llvm.org/show_bug.cgi?id=38527
6 ; Use fsin as the representative test for various data types.
8 declare <1 x float> @llvm.sin.v1f32(<1 x float>)
9 declare <2 x float> @llvm.sin.v2f32(<2 x float>)
10 declare <3 x float> @llvm.sin.v3f32(<3 x float>)
11 declare <4 x float> @llvm.sin.v4f32(<4 x float>)
12 declare <5 x float> @llvm.sin.v5f32(<5 x float>)
13 declare <6 x float> @llvm.sin.v6f32(<6 x float>)
14 declare <3 x double> @llvm.sin.v3f64(<3 x double>)
16 ; Verify that all of the potential libcall candidates are handled.
17 ; Some of these have custom lowering, so those cases won't have
20 declare <3 x float> @llvm.fabs.v3f32(<3 x float>)
21 declare <3 x float> @llvm.ceil.v3f32(<3 x float>)
22 declare <3 x float> @llvm.cos.v3f32(<3 x float>)
23 declare <3 x float> @llvm.tan.v3f32(<3 x float>)
24 declare <3 x float> @llvm.asin.v3f32(<3 x float>)
25 declare <3 x float> @llvm.acos.v3f32(<3 x float>)
26 declare <3 x float> @llvm.atan.v3f32(<3 x float>)
27 declare <3 x float> @llvm.atan2.v3f32(<3 x float>, <3 x float>)
28 declare <3 x float> @llvm.sinh.v3f32(<3 x float>)
29 declare <3 x float> @llvm.cosh.v3f32(<3 x float>)
30 declare <3 x float> @llvm.tanh.v3f32(<3 x float>)
31 declare <3 x float> @llvm.exp.v3f32(<3 x float>)
32 declare <3 x float> @llvm.exp2.v3f32(<3 x float>)
33 declare <3 x float> @llvm.floor.v3f32(<3 x float>)
34 declare <3 x float> @llvm.log.v3f32(<3 x float>)
35 declare <3 x float> @llvm.log10.v3f32(<3 x float>)
36 declare <3 x float> @llvm.log2.v3f32(<3 x float>)
37 declare <3 x float> @llvm.nearbyint.v3f32(<3 x float>)
38 declare <3 x float> @llvm.rint.v3f32(<3 x float>)
39 declare <3 x float> @llvm.round.v3f32(<3 x float>)
40 declare <3 x float> @llvm.roundeven.v3f32(<3 x float>)
41 declare <3 x float> @llvm.sqrt.v3f32(<3 x float>)
42 declare <3 x float> @llvm.trunc.v3f32(<3 x float>)
44 define <1 x float> @sin_v1f32(<1 x float> %x) nounwind {
45 ; CHECK-LABEL: sin_v1f32:
47 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
48 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
49 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
51 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $d0
52 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
54 %r = call <1 x float> @llvm.sin.v1f32(<1 x float> %x)
58 define <2 x float> @sin_v2f32(<2 x float> %x) nounwind {
59 ; CHECK-LABEL: sin_v2f32:
61 ; CHECK-NEXT: sub sp, sp, #48
62 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
63 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
64 ; CHECK-NEXT: mov s0, v0.s[1]
65 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
67 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
68 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
69 ; CHECK-NEXT: ldr q0, [sp] // 16-byte Folded Reload
70 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
72 ; CHECK-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
73 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
74 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
75 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
76 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
77 ; CHECK-NEXT: add sp, sp, #48
79 %r = call <2 x float> @llvm.sin.v2f32(<2 x float> %x)
83 define <3 x float> @sin_v3f32(<3 x float> %x) nounwind {
84 ; CHECK-LABEL: sin_v3f32:
86 ; CHECK-NEXT: sub sp, sp, #48
87 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
88 ; CHECK-NEXT: mov s0, v0.s[1]
89 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
91 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
92 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
93 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
94 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
96 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
97 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
98 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
99 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
100 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
101 ; CHECK-NEXT: mov s0, v0.s[2]
102 ; CHECK-NEXT: bl sinf
103 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
104 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
105 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
106 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
107 ; CHECK-NEXT: mov v0.16b, v1.16b
108 ; CHECK-NEXT: add sp, sp, #48
110 %r = call <3 x float> @llvm.sin.v3f32(<3 x float> %x)
114 define <4 x float> @sin_v4f32(<4 x float> %x) nounwind {
115 ; CHECK-LABEL: sin_v4f32:
117 ; CHECK-NEXT: sub sp, sp, #48
118 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
119 ; CHECK-NEXT: mov s0, v0.s[1]
120 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
121 ; CHECK-NEXT: bl sinf
122 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
123 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
124 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
125 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
126 ; CHECK-NEXT: bl sinf
127 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
128 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
129 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
130 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
131 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
132 ; CHECK-NEXT: mov s0, v0.s[2]
133 ; CHECK-NEXT: bl sinf
134 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
135 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
136 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
137 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
138 ; CHECK-NEXT: mov s0, v0.s[3]
139 ; CHECK-NEXT: str q1, [sp] // 16-byte Folded Spill
140 ; CHECK-NEXT: bl sinf
141 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
142 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
143 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
144 ; CHECK-NEXT: mov v1.s[3], v0.s[0]
145 ; CHECK-NEXT: mov v0.16b, v1.16b
146 ; CHECK-NEXT: add sp, sp, #48
148 %r = call <4 x float> @llvm.sin.v4f32(<4 x float> %x)
152 define <5 x float> @sin_v5f32(<5 x float> %x) nounwind {
153 ; CHECK-LABEL: sin_v5f32:
155 ; CHECK-NEXT: str d12, [sp, #-48]! // 8-byte Folded Spill
156 ; CHECK-NEXT: stp d11, d10, [sp, #8] // 16-byte Folded Spill
157 ; CHECK-NEXT: fmov s10, s2
158 ; CHECK-NEXT: fmov s11, s1
159 ; CHECK-NEXT: stp d9, d8, [sp, #24] // 16-byte Folded Spill
160 ; CHECK-NEXT: fmov s8, s4
161 ; CHECK-NEXT: fmov s9, s3
162 ; CHECK-NEXT: str x30, [sp, #40] // 8-byte Folded Spill
163 ; CHECK-NEXT: bl sinf
164 ; CHECK-NEXT: fmov s12, s0
165 ; CHECK-NEXT: fmov s0, s11
166 ; CHECK-NEXT: bl sinf
167 ; CHECK-NEXT: fmov s11, s0
168 ; CHECK-NEXT: fmov s0, s10
169 ; CHECK-NEXT: bl sinf
170 ; CHECK-NEXT: fmov s10, s0
171 ; CHECK-NEXT: fmov s0, s9
172 ; CHECK-NEXT: bl sinf
173 ; CHECK-NEXT: fmov s9, s0
174 ; CHECK-NEXT: fmov s0, s8
175 ; CHECK-NEXT: bl sinf
176 ; CHECK-NEXT: fmov s1, s11
177 ; CHECK-NEXT: fmov s2, s10
178 ; CHECK-NEXT: ldr x30, [sp, #40] // 8-byte Folded Reload
179 ; CHECK-NEXT: fmov s3, s9
180 ; CHECK-NEXT: ldp d9, d8, [sp, #24] // 16-byte Folded Reload
181 ; CHECK-NEXT: ldp d11, d10, [sp, #8] // 16-byte Folded Reload
182 ; CHECK-NEXT: fmov s4, s0
183 ; CHECK-NEXT: fmov s0, s12
184 ; CHECK-NEXT: ldr d12, [sp], #48 // 8-byte Folded Reload
186 %r = call <5 x float> @llvm.sin.v5f32(<5 x float> %x)
190 define <6 x float> @sin_v6f32(<6 x float> %x) nounwind {
191 ; CHECK-LABEL: sin_v6f32:
193 ; CHECK-NEXT: stp d13, d12, [sp, #-64]! // 16-byte Folded Spill
194 ; CHECK-NEXT: stp d11, d10, [sp, #16] // 16-byte Folded Spill
195 ; CHECK-NEXT: fmov s10, s3
196 ; CHECK-NEXT: fmov s11, s2
197 ; CHECK-NEXT: stp d9, d8, [sp, #32] // 16-byte Folded Spill
198 ; CHECK-NEXT: fmov s8, s5
199 ; CHECK-NEXT: fmov s9, s4
200 ; CHECK-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
201 ; CHECK-NEXT: fmov s12, s1
202 ; CHECK-NEXT: bl sinf
203 ; CHECK-NEXT: fmov s13, s0
204 ; CHECK-NEXT: fmov s0, s12
205 ; CHECK-NEXT: bl sinf
206 ; CHECK-NEXT: fmov s12, s0
207 ; CHECK-NEXT: fmov s0, s11
208 ; CHECK-NEXT: bl sinf
209 ; CHECK-NEXT: fmov s11, s0
210 ; CHECK-NEXT: fmov s0, s10
211 ; CHECK-NEXT: bl sinf
212 ; CHECK-NEXT: fmov s10, s0
213 ; CHECK-NEXT: fmov s0, s9
214 ; CHECK-NEXT: bl sinf
215 ; CHECK-NEXT: fmov s9, s0
216 ; CHECK-NEXT: fmov s0, s8
217 ; CHECK-NEXT: bl sinf
218 ; CHECK-NEXT: fmov s2, s11
219 ; CHECK-NEXT: fmov s3, s10
220 ; CHECK-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
221 ; CHECK-NEXT: fmov s4, s9
222 ; CHECK-NEXT: ldp d9, d8, [sp, #32] // 16-byte Folded Reload
223 ; CHECK-NEXT: ldp d11, d10, [sp, #16] // 16-byte Folded Reload
224 ; CHECK-NEXT: fmov s5, s0
225 ; CHECK-NEXT: fmov s0, s13
226 ; CHECK-NEXT: fmov s1, s12
227 ; CHECK-NEXT: ldp d13, d12, [sp], #64 // 16-byte Folded Reload
229 %r = call <6 x float> @llvm.sin.v6f32(<6 x float> %x)
233 define <3 x double> @sin_v3f64(<3 x double> %x) nounwind {
234 ; CHECK-LABEL: sin_v3f64:
236 ; CHECK-NEXT: str d10, [sp, #-32]! // 8-byte Folded Spill
237 ; CHECK-NEXT: stp d9, d8, [sp, #8] // 16-byte Folded Spill
238 ; CHECK-NEXT: fmov d8, d2
239 ; CHECK-NEXT: fmov d9, d1
240 ; CHECK-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
242 ; CHECK-NEXT: fmov d10, d0
243 ; CHECK-NEXT: fmov d0, d9
245 ; CHECK-NEXT: fmov d9, d0
246 ; CHECK-NEXT: fmov d0, d8
248 ; CHECK-NEXT: fmov d1, d9
249 ; CHECK-NEXT: ldp d9, d8, [sp, #8] // 16-byte Folded Reload
250 ; CHECK-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
251 ; CHECK-NEXT: fmov d2, d0
252 ; CHECK-NEXT: fmov d0, d10
253 ; CHECK-NEXT: ldr d10, [sp], #32 // 8-byte Folded Reload
255 %r = call <3 x double> @llvm.sin.v3f64(<3 x double> %x)
259 define <3 x float> @fabs_v3f32(<3 x float> %x) nounwind {
260 ; CHECK-LABEL: fabs_v3f32:
262 ; CHECK-NEXT: fabs v0.4s, v0.4s
264 %r = call <3 x float> @llvm.fabs.v3f32(<3 x float> %x)
268 define <3 x float> @ceil_v3f32(<3 x float> %x) nounwind {
269 ; CHECK-LABEL: ceil_v3f32:
271 ; CHECK-NEXT: frintp v0.4s, v0.4s
273 %r = call <3 x float> @llvm.ceil.v3f32(<3 x float> %x)
277 define <3 x float> @cos_v3f32(<3 x float> %x) nounwind {
278 ; CHECK-LABEL: cos_v3f32:
280 ; CHECK-NEXT: sub sp, sp, #48
281 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
282 ; CHECK-NEXT: mov s0, v0.s[1]
283 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
284 ; CHECK-NEXT: bl cosf
285 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
286 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
287 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
288 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
289 ; CHECK-NEXT: bl cosf
290 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
291 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
292 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
293 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
294 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
295 ; CHECK-NEXT: mov s0, v0.s[2]
296 ; CHECK-NEXT: bl cosf
297 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
298 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
299 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
300 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
301 ; CHECK-NEXT: mov v0.16b, v1.16b
302 ; CHECK-NEXT: add sp, sp, #48
304 %r = call <3 x float> @llvm.cos.v3f32(<3 x float> %x)
308 define <3 x float> @tan_v3f32(<3 x float> %x) nounwind {
309 ; CHECK-LABEL: tan_v3f32:
311 ; CHECK-NEXT: sub sp, sp, #48
312 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
313 ; CHECK-NEXT: mov s0, v0.s[1]
314 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
315 ; CHECK-NEXT: bl tanf
316 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
317 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
318 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
319 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
320 ; CHECK-NEXT: bl tanf
321 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
322 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
323 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
324 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
325 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
326 ; CHECK-NEXT: mov s0, v0.s[2]
327 ; CHECK-NEXT: bl tanf
328 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
329 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
330 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
331 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
332 ; CHECK-NEXT: mov v0.16b, v1.16b
333 ; CHECK-NEXT: add sp, sp, #48
335 %r = call <3 x float> @llvm.tan.v3f32(<3 x float> %x)
339 define <3 x float> @asin_v3f32(<3 x float> %x) nounwind {
340 ; CHECK-LABEL: asin_v3f32:
342 ; CHECK-NEXT: sub sp, sp, #48
343 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
344 ; CHECK-NEXT: mov s0, v0.s[1]
345 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
346 ; CHECK-NEXT: bl asinf
347 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
348 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
349 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
350 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
351 ; CHECK-NEXT: bl asinf
352 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
353 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
354 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
355 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
356 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
357 ; CHECK-NEXT: mov s0, v0.s[2]
358 ; CHECK-NEXT: bl asinf
359 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
360 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
361 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
362 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
363 ; CHECK-NEXT: mov v0.16b, v1.16b
364 ; CHECK-NEXT: add sp, sp, #48
366 %r = call <3 x float> @llvm.asin.v3f32(<3 x float> %x)
370 define <3 x float> @acos_v3f32(<3 x float> %x) nounwind {
371 ; CHECK-LABEL: acos_v3f32:
373 ; CHECK-NEXT: sub sp, sp, #48
374 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
375 ; CHECK-NEXT: mov s0, v0.s[1]
376 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
377 ; CHECK-NEXT: bl acosf
378 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
379 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
380 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
381 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
382 ; CHECK-NEXT: bl acosf
383 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
384 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
385 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
386 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
387 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
388 ; CHECK-NEXT: mov s0, v0.s[2]
389 ; CHECK-NEXT: bl acosf
390 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
391 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
392 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
393 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
394 ; CHECK-NEXT: mov v0.16b, v1.16b
395 ; CHECK-NEXT: add sp, sp, #48
397 %r = call <3 x float> @llvm.acos.v3f32(<3 x float> %x)
401 define <3 x float> @atan_v3f32(<3 x float> %x) nounwind {
402 ; CHECK-LABEL: atan_v3f32:
404 ; CHECK-NEXT: sub sp, sp, #48
405 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
406 ; CHECK-NEXT: mov s0, v0.s[1]
407 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
408 ; CHECK-NEXT: bl atanf
409 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
410 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
411 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
412 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
413 ; CHECK-NEXT: bl atanf
414 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
415 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
416 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
417 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
418 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
419 ; CHECK-NEXT: mov s0, v0.s[2]
420 ; CHECK-NEXT: bl atanf
421 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
422 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
423 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
424 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
425 ; CHECK-NEXT: mov v0.16b, v1.16b
426 ; CHECK-NEXT: add sp, sp, #48
428 %r = call <3 x float> @llvm.atan.v3f32(<3 x float> %x)
432 define <3 x float> @atan2_v3f32(<3 x float> %x, <3 x float> %y) nounwind {
433 ; CHECK-LABEL: atan2_v3f32:
435 ; CHECK-NEXT: sub sp, sp, #64
436 ; CHECK-NEXT: stp q0, q1, [sp, #16] // 32-byte Folded Spill
437 ; CHECK-NEXT: mov s0, v0.s[1]
438 ; CHECK-NEXT: mov s1, v1.s[1]
439 ; CHECK-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
440 ; CHECK-NEXT: bl atan2f
441 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
442 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
443 ; CHECK-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
444 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
445 ; CHECK-NEXT: // kill: def $s1 killed $s1 killed $q1
446 ; CHECK-NEXT: bl atan2f
447 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
448 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
449 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
450 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
451 ; CHECK-NEXT: ldp q0, q1, [sp, #16] // 32-byte Folded Reload
452 ; CHECK-NEXT: mov s0, v0.s[2]
453 ; CHECK-NEXT: mov s1, v1.s[2]
454 ; CHECK-NEXT: bl atan2f
455 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
456 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
457 ; CHECK-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
458 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
459 ; CHECK-NEXT: mov v0.16b, v1.16b
460 ; CHECK-NEXT: add sp, sp, #64
462 %r = call <3 x float> @llvm.atan2.v3f32(<3 x float> %x, <3 x float> %y)
466 define <3 x float> @sinh_v3f32(<3 x float> %x) nounwind {
467 ; CHECK-LABEL: sinh_v3f32:
469 ; CHECK-NEXT: sub sp, sp, #48
470 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
471 ; CHECK-NEXT: mov s0, v0.s[1]
472 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
473 ; CHECK-NEXT: bl sinhf
474 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
475 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
476 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
477 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
478 ; CHECK-NEXT: bl sinhf
479 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
480 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
481 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
482 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
483 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
484 ; CHECK-NEXT: mov s0, v0.s[2]
485 ; CHECK-NEXT: bl sinhf
486 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
487 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
488 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
489 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
490 ; CHECK-NEXT: mov v0.16b, v1.16b
491 ; CHECK-NEXT: add sp, sp, #48
493 %r = call <3 x float> @llvm.sinh.v3f32(<3 x float> %x)
496 define <3 x float> @cosh_v3f32(<3 x float> %x) nounwind {
497 ; CHECK-LABEL: cosh_v3f32:
499 ; CHECK-NEXT: sub sp, sp, #48
500 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
501 ; CHECK-NEXT: mov s0, v0.s[1]
502 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
503 ; CHECK-NEXT: bl coshf
504 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
505 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
506 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
507 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
508 ; CHECK-NEXT: bl coshf
509 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
510 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
511 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
512 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
513 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
514 ; CHECK-NEXT: mov s0, v0.s[2]
515 ; CHECK-NEXT: bl coshf
516 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
517 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
518 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
519 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
520 ; CHECK-NEXT: mov v0.16b, v1.16b
521 ; CHECK-NEXT: add sp, sp, #48
523 %r = call <3 x float> @llvm.cosh.v3f32(<3 x float> %x)
527 define <3 x float> @tanh_v3f32(<3 x float> %x) nounwind {
528 ; CHECK-LABEL: tanh_v3f32:
530 ; CHECK-NEXT: sub sp, sp, #48
531 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
532 ; CHECK-NEXT: mov s0, v0.s[1]
533 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
534 ; CHECK-NEXT: bl tanhf
535 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
536 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
537 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
538 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
539 ; CHECK-NEXT: bl tanhf
540 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
541 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
542 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
543 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
544 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
545 ; CHECK-NEXT: mov s0, v0.s[2]
546 ; CHECK-NEXT: bl tanhf
547 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
548 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
549 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
550 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
551 ; CHECK-NEXT: mov v0.16b, v1.16b
552 ; CHECK-NEXT: add sp, sp, #48
554 %r = call <3 x float> @llvm.tanh.v3f32(<3 x float> %x)
558 define <3 x float> @exp_v3f32(<3 x float> %x) nounwind {
559 ; CHECK-LABEL: exp_v3f32:
561 ; CHECK-NEXT: sub sp, sp, #48
562 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
563 ; CHECK-NEXT: mov s0, v0.s[1]
564 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
565 ; CHECK-NEXT: bl expf
566 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
567 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
568 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
569 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
570 ; CHECK-NEXT: bl expf
571 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
572 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
573 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
574 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
575 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
576 ; CHECK-NEXT: mov s0, v0.s[2]
577 ; CHECK-NEXT: bl expf
578 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
579 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
580 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
581 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
582 ; CHECK-NEXT: mov v0.16b, v1.16b
583 ; CHECK-NEXT: add sp, sp, #48
585 %r = call <3 x float> @llvm.exp.v3f32(<3 x float> %x)
589 define <3 x float> @exp2_v3f32(<3 x float> %x) nounwind {
590 ; CHECK-LABEL: exp2_v3f32:
592 ; CHECK-NEXT: sub sp, sp, #48
593 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
594 ; CHECK-NEXT: mov s0, v0.s[1]
595 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
596 ; CHECK-NEXT: bl exp2f
597 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
598 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
599 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
600 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
601 ; CHECK-NEXT: bl exp2f
602 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
603 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
604 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
605 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
606 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
607 ; CHECK-NEXT: mov s0, v0.s[2]
608 ; CHECK-NEXT: bl exp2f
609 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
610 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
611 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
612 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
613 ; CHECK-NEXT: mov v0.16b, v1.16b
614 ; CHECK-NEXT: add sp, sp, #48
616 %r = call <3 x float> @llvm.exp2.v3f32(<3 x float> %x)
620 define <3 x float> @floor_v3f32(<3 x float> %x) nounwind {
621 ; CHECK-LABEL: floor_v3f32:
623 ; CHECK-NEXT: frintm v0.4s, v0.4s
625 %r = call <3 x float> @llvm.floor.v3f32(<3 x float> %x)
629 define <3 x float> @log_v3f32(<3 x float> %x) nounwind {
630 ; CHECK-LABEL: log_v3f32:
632 ; CHECK-NEXT: sub sp, sp, #48
633 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
634 ; CHECK-NEXT: mov s0, v0.s[1]
635 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
636 ; CHECK-NEXT: bl logf
637 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
638 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
639 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
640 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
641 ; CHECK-NEXT: bl logf
642 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
643 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
644 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
645 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
646 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
647 ; CHECK-NEXT: mov s0, v0.s[2]
648 ; CHECK-NEXT: bl logf
649 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
650 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
651 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
652 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
653 ; CHECK-NEXT: mov v0.16b, v1.16b
654 ; CHECK-NEXT: add sp, sp, #48
656 %r = call <3 x float> @llvm.log.v3f32(<3 x float> %x)
660 define <3 x float> @log10_v3f32(<3 x float> %x) nounwind {
661 ; CHECK-LABEL: log10_v3f32:
663 ; CHECK-NEXT: sub sp, sp, #48
664 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
665 ; CHECK-NEXT: mov s0, v0.s[1]
666 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
667 ; CHECK-NEXT: bl log10f
668 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
669 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
670 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
671 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
672 ; CHECK-NEXT: bl log10f
673 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
674 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
675 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
676 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
677 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
678 ; CHECK-NEXT: mov s0, v0.s[2]
679 ; CHECK-NEXT: bl log10f
680 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
681 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
682 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
683 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
684 ; CHECK-NEXT: mov v0.16b, v1.16b
685 ; CHECK-NEXT: add sp, sp, #48
687 %r = call <3 x float> @llvm.log10.v3f32(<3 x float> %x)
691 define <3 x float> @log2_v3f32(<3 x float> %x) nounwind {
692 ; CHECK-LABEL: log2_v3f32:
694 ; CHECK-NEXT: sub sp, sp, #48
695 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
696 ; CHECK-NEXT: mov s0, v0.s[1]
697 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
698 ; CHECK-NEXT: bl log2f
699 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
700 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
701 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
702 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
703 ; CHECK-NEXT: bl log2f
704 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
705 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
706 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
707 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
708 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
709 ; CHECK-NEXT: mov s0, v0.s[2]
710 ; CHECK-NEXT: bl log2f
711 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
712 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
713 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
714 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
715 ; CHECK-NEXT: mov v0.16b, v1.16b
716 ; CHECK-NEXT: add sp, sp, #48
718 %r = call <3 x float> @llvm.log2.v3f32(<3 x float> %x)
722 define <3 x float> @nearbyint__v3f32(<3 x float> %x) nounwind {
723 ; CHECK-LABEL: nearbyint__v3f32:
725 ; CHECK-NEXT: frinti v0.4s, v0.4s
727 %r = call <3 x float> @llvm.nearbyint.v3f32(<3 x float> %x)
731 define <3 x float> @rint_v3f32(<3 x float> %x) nounwind {
732 ; CHECK-LABEL: rint_v3f32:
734 ; CHECK-NEXT: frintx v0.4s, v0.4s
736 %r = call <3 x float> @llvm.rint.v3f32(<3 x float> %x)
740 define <3 x float> @round_v3f32(<3 x float> %x) nounwind {
741 ; CHECK-LABEL: round_v3f32:
743 ; CHECK-NEXT: frinta v0.4s, v0.4s
745 %r = call <3 x float> @llvm.round.v3f32(<3 x float> %x)
749 define <3 x float> @roundeven_v3f32(<3 x float> %x) nounwind {
750 ; CHECK-LABEL: roundeven_v3f32:
752 ; CHECK-NEXT: frintn v0.4s, v0.4s
754 %r = call <3 x float> @llvm.roundeven.v3f32(<3 x float> %x)
758 define <3 x float> @sqrt_v3f32(<3 x float> %x) nounwind {
759 ; CHECK-LABEL: sqrt_v3f32:
761 ; CHECK-NEXT: fsqrt v0.4s, v0.4s
763 %r = call <3 x float> @llvm.sqrt.v3f32(<3 x float> %x)
767 define <3 x float> @trunc_v3f32(<3 x float> %x) nounwind {
768 ; CHECK-LABEL: trunc_v3f32:
770 ; CHECK-NEXT: frintz v0.4s, v0.4s
772 %r = call <3 x float> @llvm.trunc.v3f32(<3 x float> %x)