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.sinh.v3f32(<3 x float>)
28 declare <3 x float> @llvm.cosh.v3f32(<3 x float>)
29 declare <3 x float> @llvm.tanh.v3f32(<3 x float>)
30 declare <3 x float> @llvm.exp.v3f32(<3 x float>)
31 declare <3 x float> @llvm.exp2.v3f32(<3 x float>)
32 declare <3 x float> @llvm.floor.v3f32(<3 x float>)
33 declare <3 x float> @llvm.log.v3f32(<3 x float>)
34 declare <3 x float> @llvm.log10.v3f32(<3 x float>)
35 declare <3 x float> @llvm.log2.v3f32(<3 x float>)
36 declare <3 x float> @llvm.nearbyint.v3f32(<3 x float>)
37 declare <3 x float> @llvm.rint.v3f32(<3 x float>)
38 declare <3 x float> @llvm.round.v3f32(<3 x float>)
39 declare <3 x float> @llvm.roundeven.v3f32(<3 x float>)
40 declare <3 x float> @llvm.sqrt.v3f32(<3 x float>)
41 declare <3 x float> @llvm.trunc.v3f32(<3 x float>)
43 define <1 x float> @sin_v1f32(<1 x float> %x) nounwind {
44 ; CHECK-LABEL: sin_v1f32:
46 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
47 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
48 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
50 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $d0
51 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
53 %r = call <1 x float> @llvm.sin.v1f32(<1 x float> %x)
57 define <2 x float> @sin_v2f32(<2 x float> %x) nounwind {
58 ; CHECK-LABEL: sin_v2f32:
60 ; CHECK-NEXT: sub sp, sp, #48
61 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
62 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
63 ; CHECK-NEXT: mov s0, v0.s[1]
64 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
66 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
67 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
68 ; CHECK-NEXT: ldr q0, [sp] // 16-byte Folded Reload
69 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
71 ; CHECK-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
72 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
73 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
74 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
75 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
76 ; CHECK-NEXT: add sp, sp, #48
78 %r = call <2 x float> @llvm.sin.v2f32(<2 x float> %x)
82 define <3 x float> @sin_v3f32(<3 x float> %x) nounwind {
83 ; CHECK-LABEL: sin_v3f32:
85 ; CHECK-NEXT: sub sp, sp, #48
86 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
87 ; CHECK-NEXT: mov s0, v0.s[1]
88 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
90 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
91 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
92 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
93 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
95 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
96 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
97 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
98 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
99 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
100 ; CHECK-NEXT: mov s0, v0.s[2]
101 ; CHECK-NEXT: bl sinf
102 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
103 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
104 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
105 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
106 ; CHECK-NEXT: mov v0.16b, v1.16b
107 ; CHECK-NEXT: add sp, sp, #48
109 %r = call <3 x float> @llvm.sin.v3f32(<3 x float> %x)
113 define <4 x float> @sin_v4f32(<4 x float> %x) nounwind {
114 ; CHECK-LABEL: sin_v4f32:
116 ; CHECK-NEXT: sub sp, sp, #48
117 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
118 ; CHECK-NEXT: mov s0, v0.s[1]
119 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
120 ; CHECK-NEXT: bl sinf
121 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
122 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
123 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
124 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
125 ; CHECK-NEXT: bl sinf
126 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
127 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
128 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
129 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
130 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
131 ; CHECK-NEXT: mov s0, v0.s[2]
132 ; CHECK-NEXT: bl sinf
133 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
134 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
135 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
136 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
137 ; CHECK-NEXT: mov s0, v0.s[3]
138 ; CHECK-NEXT: str q1, [sp] // 16-byte Folded Spill
139 ; CHECK-NEXT: bl sinf
140 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
141 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
142 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
143 ; CHECK-NEXT: mov v1.s[3], v0.s[0]
144 ; CHECK-NEXT: mov v0.16b, v1.16b
145 ; CHECK-NEXT: add sp, sp, #48
147 %r = call <4 x float> @llvm.sin.v4f32(<4 x float> %x)
151 define <5 x float> @sin_v5f32(<5 x float> %x) nounwind {
152 ; CHECK-LABEL: sin_v5f32:
154 ; CHECK-NEXT: str d12, [sp, #-48]! // 8-byte Folded Spill
155 ; CHECK-NEXT: stp d11, d10, [sp, #8] // 16-byte Folded Spill
156 ; CHECK-NEXT: fmov s10, s2
157 ; CHECK-NEXT: fmov s11, s1
158 ; CHECK-NEXT: stp d9, d8, [sp, #24] // 16-byte Folded Spill
159 ; CHECK-NEXT: fmov s8, s4
160 ; CHECK-NEXT: fmov s9, s3
161 ; CHECK-NEXT: str x30, [sp, #40] // 8-byte Folded Spill
162 ; CHECK-NEXT: bl sinf
163 ; CHECK-NEXT: fmov s12, s0
164 ; CHECK-NEXT: fmov s0, s11
165 ; CHECK-NEXT: bl sinf
166 ; CHECK-NEXT: fmov s11, s0
167 ; CHECK-NEXT: fmov s0, s10
168 ; CHECK-NEXT: bl sinf
169 ; CHECK-NEXT: fmov s10, s0
170 ; CHECK-NEXT: fmov s0, s9
171 ; CHECK-NEXT: bl sinf
172 ; CHECK-NEXT: fmov s9, s0
173 ; CHECK-NEXT: fmov s0, s8
174 ; CHECK-NEXT: bl sinf
175 ; CHECK-NEXT: fmov s1, s11
176 ; CHECK-NEXT: fmov s2, s10
177 ; CHECK-NEXT: ldr x30, [sp, #40] // 8-byte Folded Reload
178 ; CHECK-NEXT: fmov s3, s9
179 ; CHECK-NEXT: ldp d9, d8, [sp, #24] // 16-byte Folded Reload
180 ; CHECK-NEXT: ldp d11, d10, [sp, #8] // 16-byte Folded Reload
181 ; CHECK-NEXT: fmov s4, s0
182 ; CHECK-NEXT: fmov s0, s12
183 ; CHECK-NEXT: ldr d12, [sp], #48 // 8-byte Folded Reload
185 %r = call <5 x float> @llvm.sin.v5f32(<5 x float> %x)
189 define <6 x float> @sin_v6f32(<6 x float> %x) nounwind {
190 ; CHECK-LABEL: sin_v6f32:
192 ; CHECK-NEXT: stp d13, d12, [sp, #-64]! // 16-byte Folded Spill
193 ; CHECK-NEXT: stp d11, d10, [sp, #16] // 16-byte Folded Spill
194 ; CHECK-NEXT: fmov s10, s3
195 ; CHECK-NEXT: fmov s11, s2
196 ; CHECK-NEXT: stp d9, d8, [sp, #32] // 16-byte Folded Spill
197 ; CHECK-NEXT: fmov s8, s5
198 ; CHECK-NEXT: fmov s9, s4
199 ; CHECK-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
200 ; CHECK-NEXT: fmov s12, s1
201 ; CHECK-NEXT: bl sinf
202 ; CHECK-NEXT: fmov s13, s0
203 ; CHECK-NEXT: fmov s0, s12
204 ; CHECK-NEXT: bl sinf
205 ; CHECK-NEXT: fmov s12, s0
206 ; CHECK-NEXT: fmov s0, s11
207 ; CHECK-NEXT: bl sinf
208 ; CHECK-NEXT: fmov s11, s0
209 ; CHECK-NEXT: fmov s0, s10
210 ; CHECK-NEXT: bl sinf
211 ; CHECK-NEXT: fmov s10, s0
212 ; CHECK-NEXT: fmov s0, s9
213 ; CHECK-NEXT: bl sinf
214 ; CHECK-NEXT: fmov s9, s0
215 ; CHECK-NEXT: fmov s0, s8
216 ; CHECK-NEXT: bl sinf
217 ; CHECK-NEXT: fmov s2, s11
218 ; CHECK-NEXT: fmov s3, s10
219 ; CHECK-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
220 ; CHECK-NEXT: fmov s4, s9
221 ; CHECK-NEXT: ldp d9, d8, [sp, #32] // 16-byte Folded Reload
222 ; CHECK-NEXT: ldp d11, d10, [sp, #16] // 16-byte Folded Reload
223 ; CHECK-NEXT: fmov s5, s0
224 ; CHECK-NEXT: fmov s0, s13
225 ; CHECK-NEXT: fmov s1, s12
226 ; CHECK-NEXT: ldp d13, d12, [sp], #64 // 16-byte Folded Reload
228 %r = call <6 x float> @llvm.sin.v6f32(<6 x float> %x)
232 define <3 x double> @sin_v3f64(<3 x double> %x) nounwind {
233 ; CHECK-LABEL: sin_v3f64:
235 ; CHECK-NEXT: str d10, [sp, #-32]! // 8-byte Folded Spill
236 ; CHECK-NEXT: stp d9, d8, [sp, #8] // 16-byte Folded Spill
237 ; CHECK-NEXT: fmov d8, d2
238 ; CHECK-NEXT: fmov d9, d1
239 ; CHECK-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
241 ; CHECK-NEXT: fmov d10, d0
242 ; CHECK-NEXT: fmov d0, d9
244 ; CHECK-NEXT: fmov d9, d0
245 ; CHECK-NEXT: fmov d0, d8
247 ; CHECK-NEXT: fmov d1, d9
248 ; CHECK-NEXT: ldp d9, d8, [sp, #8] // 16-byte Folded Reload
249 ; CHECK-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
250 ; CHECK-NEXT: fmov d2, d0
251 ; CHECK-NEXT: fmov d0, d10
252 ; CHECK-NEXT: ldr d10, [sp], #32 // 8-byte Folded Reload
254 %r = call <3 x double> @llvm.sin.v3f64(<3 x double> %x)
258 define <3 x float> @fabs_v3f32(<3 x float> %x) nounwind {
259 ; CHECK-LABEL: fabs_v3f32:
261 ; CHECK-NEXT: fabs v0.4s, v0.4s
263 %r = call <3 x float> @llvm.fabs.v3f32(<3 x float> %x)
267 define <3 x float> @ceil_v3f32(<3 x float> %x) nounwind {
268 ; CHECK-LABEL: ceil_v3f32:
270 ; CHECK-NEXT: frintp v0.4s, v0.4s
272 %r = call <3 x float> @llvm.ceil.v3f32(<3 x float> %x)
276 define <3 x float> @cos_v3f32(<3 x float> %x) nounwind {
277 ; CHECK-LABEL: cos_v3f32:
279 ; CHECK-NEXT: sub sp, sp, #48
280 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
281 ; CHECK-NEXT: mov s0, v0.s[1]
282 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
283 ; CHECK-NEXT: bl cosf
284 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
285 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
286 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
287 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
288 ; CHECK-NEXT: bl cosf
289 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
290 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
291 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
292 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
293 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
294 ; CHECK-NEXT: mov s0, v0.s[2]
295 ; CHECK-NEXT: bl cosf
296 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
297 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
298 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
299 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
300 ; CHECK-NEXT: mov v0.16b, v1.16b
301 ; CHECK-NEXT: add sp, sp, #48
303 %r = call <3 x float> @llvm.cos.v3f32(<3 x float> %x)
307 define <3 x float> @tan_v3f32(<3 x float> %x) nounwind {
308 ; CHECK-LABEL: tan_v3f32:
310 ; CHECK-NEXT: sub sp, sp, #48
311 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
312 ; CHECK-NEXT: mov s0, v0.s[1]
313 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
314 ; CHECK-NEXT: bl tanf
315 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
316 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
317 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
318 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
319 ; CHECK-NEXT: bl tanf
320 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
321 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
322 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
323 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
324 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
325 ; CHECK-NEXT: mov s0, v0.s[2]
326 ; CHECK-NEXT: bl tanf
327 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
328 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
329 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
330 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
331 ; CHECK-NEXT: mov v0.16b, v1.16b
332 ; CHECK-NEXT: add sp, sp, #48
334 %r = call <3 x float> @llvm.tan.v3f32(<3 x float> %x)
338 define <3 x float> @asin_v3f32(<3 x float> %x) nounwind {
339 ; CHECK-LABEL: asin_v3f32:
341 ; CHECK-NEXT: sub sp, sp, #48
342 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
343 ; CHECK-NEXT: mov s0, v0.s[1]
344 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
345 ; CHECK-NEXT: bl asinf
346 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
347 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
348 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
349 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
350 ; CHECK-NEXT: bl asinf
351 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
352 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
353 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
354 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
355 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
356 ; CHECK-NEXT: mov s0, v0.s[2]
357 ; CHECK-NEXT: bl asinf
358 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
359 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
360 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
361 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
362 ; CHECK-NEXT: mov v0.16b, v1.16b
363 ; CHECK-NEXT: add sp, sp, #48
365 %r = call <3 x float> @llvm.asin.v3f32(<3 x float> %x)
369 define <3 x float> @acos_v3f32(<3 x float> %x) nounwind {
370 ; CHECK-LABEL: acos_v3f32:
372 ; CHECK-NEXT: sub sp, sp, #48
373 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
374 ; CHECK-NEXT: mov s0, v0.s[1]
375 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
376 ; CHECK-NEXT: bl acosf
377 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
378 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
379 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
380 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
381 ; CHECK-NEXT: bl acosf
382 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
383 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
384 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
385 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
386 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
387 ; CHECK-NEXT: mov s0, v0.s[2]
388 ; CHECK-NEXT: bl acosf
389 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
390 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
391 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
392 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
393 ; CHECK-NEXT: mov v0.16b, v1.16b
394 ; CHECK-NEXT: add sp, sp, #48
396 %r = call <3 x float> @llvm.acos.v3f32(<3 x float> %x)
400 define <3 x float> @atan_v3f32(<3 x float> %x) nounwind {
401 ; CHECK-LABEL: atan_v3f32:
403 ; CHECK-NEXT: sub sp, sp, #48
404 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
405 ; CHECK-NEXT: mov s0, v0.s[1]
406 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
407 ; CHECK-NEXT: bl atanf
408 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
409 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
410 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
411 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
412 ; CHECK-NEXT: bl atanf
413 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
414 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
415 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
416 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
417 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
418 ; CHECK-NEXT: mov s0, v0.s[2]
419 ; CHECK-NEXT: bl atanf
420 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
421 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
422 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
423 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
424 ; CHECK-NEXT: mov v0.16b, v1.16b
425 ; CHECK-NEXT: add sp, sp, #48
427 %r = call <3 x float> @llvm.atan.v3f32(<3 x float> %x)
431 define <3 x float> @sinh_v3f32(<3 x float> %x) nounwind {
432 ; CHECK-LABEL: sinh_v3f32:
434 ; CHECK-NEXT: sub sp, sp, #48
435 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
436 ; CHECK-NEXT: mov s0, v0.s[1]
437 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
438 ; CHECK-NEXT: bl sinhf
439 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
440 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
441 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
442 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
443 ; CHECK-NEXT: bl sinhf
444 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
445 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
446 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
447 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
448 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
449 ; CHECK-NEXT: mov s0, v0.s[2]
450 ; CHECK-NEXT: bl sinhf
451 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
452 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
453 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
454 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
455 ; CHECK-NEXT: mov v0.16b, v1.16b
456 ; CHECK-NEXT: add sp, sp, #48
458 %r = call <3 x float> @llvm.sinh.v3f32(<3 x float> %x)
461 define <3 x float> @cosh_v3f32(<3 x float> %x) nounwind {
462 ; CHECK-LABEL: cosh_v3f32:
464 ; CHECK-NEXT: sub sp, sp, #48
465 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
466 ; CHECK-NEXT: mov s0, v0.s[1]
467 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
468 ; CHECK-NEXT: bl coshf
469 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
470 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
471 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
472 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
473 ; CHECK-NEXT: bl coshf
474 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
475 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
476 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
477 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
478 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
479 ; CHECK-NEXT: mov s0, v0.s[2]
480 ; CHECK-NEXT: bl coshf
481 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
482 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
483 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
484 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
485 ; CHECK-NEXT: mov v0.16b, v1.16b
486 ; CHECK-NEXT: add sp, sp, #48
488 %r = call <3 x float> @llvm.cosh.v3f32(<3 x float> %x)
492 define <3 x float> @tanh_v3f32(<3 x float> %x) nounwind {
493 ; CHECK-LABEL: tanh_v3f32:
495 ; CHECK-NEXT: sub sp, sp, #48
496 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
497 ; CHECK-NEXT: mov s0, v0.s[1]
498 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
499 ; CHECK-NEXT: bl tanhf
500 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
501 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
502 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
503 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
504 ; CHECK-NEXT: bl tanhf
505 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
506 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
507 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
508 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
509 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
510 ; CHECK-NEXT: mov s0, v0.s[2]
511 ; CHECK-NEXT: bl tanhf
512 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
513 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
514 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
515 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
516 ; CHECK-NEXT: mov v0.16b, v1.16b
517 ; CHECK-NEXT: add sp, sp, #48
519 %r = call <3 x float> @llvm.tanh.v3f32(<3 x float> %x)
523 define <3 x float> @exp_v3f32(<3 x float> %x) nounwind {
524 ; CHECK-LABEL: exp_v3f32:
526 ; CHECK-NEXT: sub sp, sp, #48
527 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
528 ; CHECK-NEXT: mov s0, v0.s[1]
529 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
530 ; CHECK-NEXT: bl expf
531 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
532 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
533 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
534 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
535 ; CHECK-NEXT: bl expf
536 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
537 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
538 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
539 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
540 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
541 ; CHECK-NEXT: mov s0, v0.s[2]
542 ; CHECK-NEXT: bl expf
543 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
544 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
545 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
546 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
547 ; CHECK-NEXT: mov v0.16b, v1.16b
548 ; CHECK-NEXT: add sp, sp, #48
550 %r = call <3 x float> @llvm.exp.v3f32(<3 x float> %x)
554 define <3 x float> @exp2_v3f32(<3 x float> %x) nounwind {
555 ; CHECK-LABEL: exp2_v3f32:
557 ; CHECK-NEXT: sub sp, sp, #48
558 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
559 ; CHECK-NEXT: mov s0, v0.s[1]
560 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
561 ; CHECK-NEXT: bl exp2f
562 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
563 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
564 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
565 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
566 ; CHECK-NEXT: bl exp2f
567 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
568 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
569 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
570 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
571 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
572 ; CHECK-NEXT: mov s0, v0.s[2]
573 ; CHECK-NEXT: bl exp2f
574 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
575 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
576 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
577 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
578 ; CHECK-NEXT: mov v0.16b, v1.16b
579 ; CHECK-NEXT: add sp, sp, #48
581 %r = call <3 x float> @llvm.exp2.v3f32(<3 x float> %x)
585 define <3 x float> @floor_v3f32(<3 x float> %x) nounwind {
586 ; CHECK-LABEL: floor_v3f32:
588 ; CHECK-NEXT: frintm v0.4s, v0.4s
590 %r = call <3 x float> @llvm.floor.v3f32(<3 x float> %x)
594 define <3 x float> @log_v3f32(<3 x float> %x) nounwind {
595 ; CHECK-LABEL: log_v3f32:
597 ; CHECK-NEXT: sub sp, sp, #48
598 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
599 ; CHECK-NEXT: mov s0, v0.s[1]
600 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
601 ; CHECK-NEXT: bl logf
602 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
603 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
604 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
605 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
606 ; CHECK-NEXT: bl logf
607 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
608 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
609 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
610 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
611 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
612 ; CHECK-NEXT: mov s0, v0.s[2]
613 ; CHECK-NEXT: bl logf
614 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
615 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
616 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
617 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
618 ; CHECK-NEXT: mov v0.16b, v1.16b
619 ; CHECK-NEXT: add sp, sp, #48
621 %r = call <3 x float> @llvm.log.v3f32(<3 x float> %x)
625 define <3 x float> @log10_v3f32(<3 x float> %x) nounwind {
626 ; CHECK-LABEL: log10_v3f32:
628 ; CHECK-NEXT: sub sp, sp, #48
629 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
630 ; CHECK-NEXT: mov s0, v0.s[1]
631 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
632 ; CHECK-NEXT: bl log10f
633 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
634 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
635 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
636 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
637 ; CHECK-NEXT: bl log10f
638 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
639 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
640 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
641 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
642 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
643 ; CHECK-NEXT: mov s0, v0.s[2]
644 ; CHECK-NEXT: bl log10f
645 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
646 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
647 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
648 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
649 ; CHECK-NEXT: mov v0.16b, v1.16b
650 ; CHECK-NEXT: add sp, sp, #48
652 %r = call <3 x float> @llvm.log10.v3f32(<3 x float> %x)
656 define <3 x float> @log2_v3f32(<3 x float> %x) nounwind {
657 ; CHECK-LABEL: log2_v3f32:
659 ; CHECK-NEXT: sub sp, sp, #48
660 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
661 ; CHECK-NEXT: mov s0, v0.s[1]
662 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
663 ; CHECK-NEXT: bl log2f
664 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
665 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
666 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
667 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
668 ; CHECK-NEXT: bl log2f
669 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
670 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
671 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
672 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
673 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
674 ; CHECK-NEXT: mov s0, v0.s[2]
675 ; CHECK-NEXT: bl log2f
676 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
677 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
678 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
679 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
680 ; CHECK-NEXT: mov v0.16b, v1.16b
681 ; CHECK-NEXT: add sp, sp, #48
683 %r = call <3 x float> @llvm.log2.v3f32(<3 x float> %x)
687 define <3 x float> @nearbyint__v3f32(<3 x float> %x) nounwind {
688 ; CHECK-LABEL: nearbyint__v3f32:
690 ; CHECK-NEXT: frinti v0.4s, v0.4s
692 %r = call <3 x float> @llvm.nearbyint.v3f32(<3 x float> %x)
696 define <3 x float> @rint_v3f32(<3 x float> %x) nounwind {
697 ; CHECK-LABEL: rint_v3f32:
699 ; CHECK-NEXT: frintx v0.4s, v0.4s
701 %r = call <3 x float> @llvm.rint.v3f32(<3 x float> %x)
705 define <3 x float> @round_v3f32(<3 x float> %x) nounwind {
706 ; CHECK-LABEL: round_v3f32:
708 ; CHECK-NEXT: frinta v0.4s, v0.4s
710 %r = call <3 x float> @llvm.round.v3f32(<3 x float> %x)
714 define <3 x float> @roundeven_v3f32(<3 x float> %x) nounwind {
715 ; CHECK-LABEL: roundeven_v3f32:
717 ; CHECK-NEXT: frintn v0.4s, v0.4s
719 %r = call <3 x float> @llvm.roundeven.v3f32(<3 x float> %x)
723 define <3 x float> @sqrt_v3f32(<3 x float> %x) nounwind {
724 ; CHECK-LABEL: sqrt_v3f32:
726 ; CHECK-NEXT: fsqrt v0.4s, v0.4s
728 %r = call <3 x float> @llvm.sqrt.v3f32(<3 x float> %x)
732 define <3 x float> @trunc_v3f32(<3 x float> %x) nounwind {
733 ; CHECK-LABEL: trunc_v3f32:
735 ; CHECK-NEXT: frintz v0.4s, v0.4s
737 %r = call <3 x float> @llvm.trunc.v3f32(<3 x float> %x)