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.exp.v3f32(<3 x float>)
24 declare <3 x float> @llvm.exp2.v3f32(<3 x float>)
25 declare <3 x float> @llvm.floor.v3f32(<3 x float>)
26 declare <3 x float> @llvm.log.v3f32(<3 x float>)
27 declare <3 x float> @llvm.log10.v3f32(<3 x float>)
28 declare <3 x float> @llvm.log2.v3f32(<3 x float>)
29 declare <3 x float> @llvm.nearbyint.v3f32(<3 x float>)
30 declare <3 x float> @llvm.rint.v3f32(<3 x float>)
31 declare <3 x float> @llvm.round.v3f32(<3 x float>)
32 declare <3 x float> @llvm.roundeven.v3f32(<3 x float>)
33 declare <3 x float> @llvm.sqrt.v3f32(<3 x float>)
34 declare <3 x float> @llvm.trunc.v3f32(<3 x float>)
36 define <1 x float> @sin_v1f32(<1 x float> %x) nounwind {
37 ; CHECK-LABEL: sin_v1f32:
39 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
40 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
41 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
43 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $d0
44 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
46 %r = call <1 x float> @llvm.sin.v1f32(<1 x float> %x)
50 define <2 x float> @sin_v2f32(<2 x float> %x) nounwind {
51 ; CHECK-LABEL: sin_v2f32:
53 ; CHECK-NEXT: sub sp, sp, #48
54 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
55 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
56 ; CHECK-NEXT: mov s0, v0.s[1]
57 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
59 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
60 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
61 ; CHECK-NEXT: ldr q0, [sp] // 16-byte Folded Reload
62 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
64 ; CHECK-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
65 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
66 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
67 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
68 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
69 ; CHECK-NEXT: add sp, sp, #48
71 %r = call <2 x float> @llvm.sin.v2f32(<2 x float> %x)
75 define <3 x float> @sin_v3f32(<3 x float> %x) nounwind {
76 ; CHECK-LABEL: sin_v3f32:
78 ; CHECK-NEXT: sub sp, sp, #48
79 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
80 ; CHECK-NEXT: mov s0, v0.s[1]
81 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
83 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
84 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
85 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
86 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
88 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
89 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
90 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
91 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
92 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
93 ; CHECK-NEXT: mov s0, v0.s[2]
95 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
96 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
97 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
98 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
99 ; CHECK-NEXT: mov v0.16b, v1.16b
100 ; CHECK-NEXT: add sp, sp, #48
102 %r = call <3 x float> @llvm.sin.v3f32(<3 x float> %x)
106 define <4 x float> @sin_v4f32(<4 x float> %x) nounwind {
107 ; CHECK-LABEL: sin_v4f32:
109 ; CHECK-NEXT: sub sp, sp, #48
110 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
111 ; CHECK-NEXT: mov s0, v0.s[1]
112 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
113 ; CHECK-NEXT: bl sinf
114 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
115 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
116 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
117 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
118 ; CHECK-NEXT: bl sinf
119 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
120 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
121 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
122 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
123 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
124 ; CHECK-NEXT: mov s0, v0.s[2]
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 v1.s[2], v0.s[0]
129 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
130 ; CHECK-NEXT: mov s0, v0.s[3]
131 ; CHECK-NEXT: str q1, [sp] // 16-byte Folded Spill
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: ldr x30, [sp, #32] // 8-byte Folded Reload
136 ; CHECK-NEXT: mov v1.s[3], v0.s[0]
137 ; CHECK-NEXT: mov v0.16b, v1.16b
138 ; CHECK-NEXT: add sp, sp, #48
140 %r = call <4 x float> @llvm.sin.v4f32(<4 x float> %x)
144 define <5 x float> @sin_v5f32(<5 x float> %x) nounwind {
145 ; CHECK-LABEL: sin_v5f32:
147 ; CHECK-NEXT: str d12, [sp, #-48]! // 8-byte Folded Spill
148 ; CHECK-NEXT: stp d11, d10, [sp, #8] // 16-byte Folded Spill
149 ; CHECK-NEXT: fmov s10, s2
150 ; CHECK-NEXT: fmov s11, s1
151 ; CHECK-NEXT: stp d9, d8, [sp, #24] // 16-byte Folded Spill
152 ; CHECK-NEXT: fmov s8, s4
153 ; CHECK-NEXT: fmov s9, s3
154 ; CHECK-NEXT: str x30, [sp, #40] // 8-byte Folded Spill
155 ; CHECK-NEXT: bl sinf
156 ; CHECK-NEXT: fmov s12, s0
157 ; CHECK-NEXT: fmov s0, s11
158 ; CHECK-NEXT: bl sinf
159 ; CHECK-NEXT: fmov s11, s0
160 ; CHECK-NEXT: fmov s0, s10
161 ; CHECK-NEXT: bl sinf
162 ; CHECK-NEXT: fmov s10, s0
163 ; CHECK-NEXT: fmov s0, s9
164 ; CHECK-NEXT: bl sinf
165 ; CHECK-NEXT: fmov s9, s0
166 ; CHECK-NEXT: fmov s0, s8
167 ; CHECK-NEXT: bl sinf
168 ; CHECK-NEXT: fmov s1, s11
169 ; CHECK-NEXT: fmov s2, s10
170 ; CHECK-NEXT: ldr x30, [sp, #40] // 8-byte Folded Reload
171 ; CHECK-NEXT: fmov s3, s9
172 ; CHECK-NEXT: ldp d9, d8, [sp, #24] // 16-byte Folded Reload
173 ; CHECK-NEXT: ldp d11, d10, [sp, #8] // 16-byte Folded Reload
174 ; CHECK-NEXT: fmov s4, s0
175 ; CHECK-NEXT: fmov s0, s12
176 ; CHECK-NEXT: ldr d12, [sp], #48 // 8-byte Folded Reload
178 %r = call <5 x float> @llvm.sin.v5f32(<5 x float> %x)
182 define <6 x float> @sin_v6f32(<6 x float> %x) nounwind {
183 ; CHECK-LABEL: sin_v6f32:
185 ; CHECK-NEXT: stp d13, d12, [sp, #-64]! // 16-byte Folded Spill
186 ; CHECK-NEXT: stp d11, d10, [sp, #16] // 16-byte Folded Spill
187 ; CHECK-NEXT: fmov s10, s3
188 ; CHECK-NEXT: fmov s11, s2
189 ; CHECK-NEXT: stp d9, d8, [sp, #32] // 16-byte Folded Spill
190 ; CHECK-NEXT: fmov s8, s5
191 ; CHECK-NEXT: fmov s9, s4
192 ; CHECK-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
193 ; CHECK-NEXT: fmov s12, s1
194 ; CHECK-NEXT: bl sinf
195 ; CHECK-NEXT: fmov s13, s0
196 ; CHECK-NEXT: fmov s0, s12
197 ; CHECK-NEXT: bl sinf
198 ; CHECK-NEXT: fmov s12, s0
199 ; CHECK-NEXT: fmov s0, s11
200 ; CHECK-NEXT: bl sinf
201 ; CHECK-NEXT: fmov s11, s0
202 ; CHECK-NEXT: fmov s0, s10
203 ; CHECK-NEXT: bl sinf
204 ; CHECK-NEXT: fmov s10, s0
205 ; CHECK-NEXT: fmov s0, s9
206 ; CHECK-NEXT: bl sinf
207 ; CHECK-NEXT: fmov s9, s0
208 ; CHECK-NEXT: fmov s0, s8
209 ; CHECK-NEXT: bl sinf
210 ; CHECK-NEXT: fmov s2, s11
211 ; CHECK-NEXT: fmov s3, s10
212 ; CHECK-NEXT: ldr x30, [sp, #48] // 8-byte Folded Reload
213 ; CHECK-NEXT: fmov s4, s9
214 ; CHECK-NEXT: ldp d9, d8, [sp, #32] // 16-byte Folded Reload
215 ; CHECK-NEXT: ldp d11, d10, [sp, #16] // 16-byte Folded Reload
216 ; CHECK-NEXT: fmov s5, s0
217 ; CHECK-NEXT: fmov s0, s13
218 ; CHECK-NEXT: fmov s1, s12
219 ; CHECK-NEXT: ldp d13, d12, [sp], #64 // 16-byte Folded Reload
221 %r = call <6 x float> @llvm.sin.v6f32(<6 x float> %x)
225 define <3 x double> @sin_v3f64(<3 x double> %x) nounwind {
226 ; CHECK-LABEL: sin_v3f64:
228 ; CHECK-NEXT: str d10, [sp, #-32]! // 8-byte Folded Spill
229 ; CHECK-NEXT: stp d9, d8, [sp, #8] // 16-byte Folded Spill
230 ; CHECK-NEXT: fmov d8, d2
231 ; CHECK-NEXT: fmov d9, d1
232 ; CHECK-NEXT: str x30, [sp, #24] // 8-byte Folded Spill
234 ; CHECK-NEXT: fmov d10, d0
235 ; CHECK-NEXT: fmov d0, d9
237 ; CHECK-NEXT: fmov d9, d0
238 ; CHECK-NEXT: fmov d0, d8
240 ; CHECK-NEXT: fmov d1, d9
241 ; CHECK-NEXT: ldp d9, d8, [sp, #8] // 16-byte Folded Reload
242 ; CHECK-NEXT: ldr x30, [sp, #24] // 8-byte Folded Reload
243 ; CHECK-NEXT: fmov d2, d0
244 ; CHECK-NEXT: fmov d0, d10
245 ; CHECK-NEXT: ldr d10, [sp], #32 // 8-byte Folded Reload
247 %r = call <3 x double> @llvm.sin.v3f64(<3 x double> %x)
251 define <3 x float> @fabs_v3f32(<3 x float> %x) nounwind {
252 ; CHECK-LABEL: fabs_v3f32:
254 ; CHECK-NEXT: fabs v0.4s, v0.4s
256 %r = call <3 x float> @llvm.fabs.v3f32(<3 x float> %x)
260 define <3 x float> @ceil_v3f32(<3 x float> %x) nounwind {
261 ; CHECK-LABEL: ceil_v3f32:
263 ; CHECK-NEXT: frintp v0.4s, v0.4s
265 %r = call <3 x float> @llvm.ceil.v3f32(<3 x float> %x)
269 define <3 x float> @cos_v3f32(<3 x float> %x) nounwind {
270 ; CHECK-LABEL: cos_v3f32:
272 ; CHECK-NEXT: sub sp, sp, #48
273 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
274 ; CHECK-NEXT: mov s0, v0.s[1]
275 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
276 ; CHECK-NEXT: bl cosf
277 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
278 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
279 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
280 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
281 ; CHECK-NEXT: bl cosf
282 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
283 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
284 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
285 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
286 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
287 ; CHECK-NEXT: mov s0, v0.s[2]
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: ldr x30, [sp, #32] // 8-byte Folded Reload
292 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
293 ; CHECK-NEXT: mov v0.16b, v1.16b
294 ; CHECK-NEXT: add sp, sp, #48
296 %r = call <3 x float> @llvm.cos.v3f32(<3 x float> %x)
300 define <3 x float> @exp_v3f32(<3 x float> %x) nounwind {
301 ; CHECK-LABEL: exp_v3f32:
303 ; CHECK-NEXT: sub sp, sp, #48
304 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
305 ; CHECK-NEXT: mov s0, v0.s[1]
306 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
307 ; CHECK-NEXT: bl expf
308 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
309 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
310 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
311 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
312 ; CHECK-NEXT: bl expf
313 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
314 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
315 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
316 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
317 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
318 ; CHECK-NEXT: mov s0, v0.s[2]
319 ; CHECK-NEXT: bl expf
320 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
321 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
322 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
323 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
324 ; CHECK-NEXT: mov v0.16b, v1.16b
325 ; CHECK-NEXT: add sp, sp, #48
327 %r = call <3 x float> @llvm.exp.v3f32(<3 x float> %x)
331 define <3 x float> @exp2_v3f32(<3 x float> %x) nounwind {
332 ; CHECK-LABEL: exp2_v3f32:
334 ; CHECK-NEXT: sub sp, sp, #48
335 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
336 ; CHECK-NEXT: mov s0, v0.s[1]
337 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
338 ; CHECK-NEXT: bl exp2f
339 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
340 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
341 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
342 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
343 ; CHECK-NEXT: bl exp2f
344 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
345 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
346 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
347 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
348 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
349 ; CHECK-NEXT: mov s0, v0.s[2]
350 ; CHECK-NEXT: bl exp2f
351 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
352 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
353 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
354 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
355 ; CHECK-NEXT: mov v0.16b, v1.16b
356 ; CHECK-NEXT: add sp, sp, #48
358 %r = call <3 x float> @llvm.exp2.v3f32(<3 x float> %x)
362 define <3 x float> @floor_v3f32(<3 x float> %x) nounwind {
363 ; CHECK-LABEL: floor_v3f32:
365 ; CHECK-NEXT: frintm v0.4s, v0.4s
367 %r = call <3 x float> @llvm.floor.v3f32(<3 x float> %x)
371 define <3 x float> @log_v3f32(<3 x float> %x) nounwind {
372 ; CHECK-LABEL: log_v3f32:
374 ; CHECK-NEXT: sub sp, sp, #48
375 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
376 ; CHECK-NEXT: mov s0, v0.s[1]
377 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
378 ; CHECK-NEXT: bl logf
379 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
380 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
381 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
382 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
383 ; CHECK-NEXT: bl logf
384 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
385 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
386 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
387 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
388 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
389 ; CHECK-NEXT: mov s0, v0.s[2]
390 ; CHECK-NEXT: bl logf
391 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
392 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
393 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
394 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
395 ; CHECK-NEXT: mov v0.16b, v1.16b
396 ; CHECK-NEXT: add sp, sp, #48
398 %r = call <3 x float> @llvm.log.v3f32(<3 x float> %x)
402 define <3 x float> @log10_v3f32(<3 x float> %x) nounwind {
403 ; CHECK-LABEL: log10_v3f32:
405 ; CHECK-NEXT: sub sp, sp, #48
406 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
407 ; CHECK-NEXT: mov s0, v0.s[1]
408 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
409 ; CHECK-NEXT: bl log10f
410 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
411 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
412 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
413 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
414 ; CHECK-NEXT: bl log10f
415 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
416 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
417 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
418 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
419 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
420 ; CHECK-NEXT: mov s0, v0.s[2]
421 ; CHECK-NEXT: bl log10f
422 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
423 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
424 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
425 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
426 ; CHECK-NEXT: mov v0.16b, v1.16b
427 ; CHECK-NEXT: add sp, sp, #48
429 %r = call <3 x float> @llvm.log10.v3f32(<3 x float> %x)
433 define <3 x float> @log2_v3f32(<3 x float> %x) nounwind {
434 ; CHECK-LABEL: log2_v3f32:
436 ; CHECK-NEXT: sub sp, sp, #48
437 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
438 ; CHECK-NEXT: mov s0, v0.s[1]
439 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
440 ; CHECK-NEXT: bl log2f
441 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
442 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
443 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
444 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
445 ; CHECK-NEXT: bl log2f
446 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
447 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
448 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
449 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
450 ; CHECK-NEXT: ldr q0, [sp, #16] // 16-byte Folded Reload
451 ; CHECK-NEXT: mov s0, v0.s[2]
452 ; CHECK-NEXT: bl log2f
453 ; CHECK-NEXT: ldr q1, [sp] // 16-byte Folded Reload
454 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
455 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
456 ; CHECK-NEXT: mov v1.s[2], v0.s[0]
457 ; CHECK-NEXT: mov v0.16b, v1.16b
458 ; CHECK-NEXT: add sp, sp, #48
460 %r = call <3 x float> @llvm.log2.v3f32(<3 x float> %x)
464 define <3 x float> @nearbyint__v3f32(<3 x float> %x) nounwind {
465 ; CHECK-LABEL: nearbyint__v3f32:
467 ; CHECK-NEXT: frinti v0.4s, v0.4s
469 %r = call <3 x float> @llvm.nearbyint.v3f32(<3 x float> %x)
473 define <3 x float> @rint_v3f32(<3 x float> %x) nounwind {
474 ; CHECK-LABEL: rint_v3f32:
476 ; CHECK-NEXT: frintx v0.4s, v0.4s
478 %r = call <3 x float> @llvm.rint.v3f32(<3 x float> %x)
482 define <3 x float> @round_v3f32(<3 x float> %x) nounwind {
483 ; CHECK-LABEL: round_v3f32:
485 ; CHECK-NEXT: frinta v0.4s, v0.4s
487 %r = call <3 x float> @llvm.round.v3f32(<3 x float> %x)
491 define <3 x float> @roundeven_v3f32(<3 x float> %x) nounwind {
492 ; CHECK-LABEL: roundeven_v3f32:
494 ; CHECK-NEXT: frintn v0.4s, v0.4s
496 %r = call <3 x float> @llvm.roundeven.v3f32(<3 x float> %x)
500 define <3 x float> @sqrt_v3f32(<3 x float> %x) nounwind {
501 ; CHECK-LABEL: sqrt_v3f32:
503 ; CHECK-NEXT: fsqrt v0.4s, v0.4s
505 %r = call <3 x float> @llvm.sqrt.v3f32(<3 x float> %x)
509 define <3 x float> @trunc_v3f32(<3 x float> %x) nounwind {
510 ; CHECK-LABEL: trunc_v3f32:
512 ; CHECK-NEXT: frintz v0.4s, v0.4s
514 %r = call <3 x float> @llvm.trunc.v3f32(<3 x float> %x)