• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=aarch64-- | FileCheck %s
3
4; PR38527 - https://bugs.llvm.org/show_bug.cgi?id=38527
5
6; Use fsin as the representative test for various data types.
7
8declare <1 x float> @llvm.sin.v1f32(<1 x float>)
9declare <2 x float> @llvm.sin.v2f32(<2 x float>)
10declare <3 x float> @llvm.sin.v3f32(<3 x float>)
11declare <4 x float> @llvm.sin.v4f32(<4 x float>)
12declare <5 x float> @llvm.sin.v5f32(<5 x float>)
13declare <6 x float> @llvm.sin.v6f32(<6 x float>)
14declare <3 x double> @llvm.sin.v3f64(<3 x double>)
15
16; Verify that all of the potential libcall candidates are handled.
17; Some of these have custom lowering, so those cases won't have
18; libcalls.
19
20declare <3 x float> @llvm.fabs.v3f32(<3 x float>)
21declare <3 x float> @llvm.ceil.v3f32(<3 x float>)
22declare <3 x float> @llvm.cos.v3f32(<3 x float>)
23declare <3 x float> @llvm.exp.v3f32(<3 x float>)
24declare <3 x float> @llvm.exp2.v3f32(<3 x float>)
25declare <3 x float> @llvm.floor.v3f32(<3 x float>)
26declare <3 x float> @llvm.log.v3f32(<3 x float>)
27declare <3 x float> @llvm.log10.v3f32(<3 x float>)
28declare <3 x float> @llvm.log2.v3f32(<3 x float>)
29declare <3 x float> @llvm.nearbyint.v3f32(<3 x float>)
30declare <3 x float> @llvm.rint.v3f32(<3 x float>)
31declare <3 x float> @llvm.round.v3f32(<3 x float>)
32declare <3 x float> @llvm.sqrt.v3f32(<3 x float>)
33declare <3 x float> @llvm.trunc.v3f32(<3 x float>)
34
35define <1 x float> @sin_v1f32(<1 x float> %x) nounwind {
36; CHECK-LABEL: sin_v1f32:
37; CHECK:       // %bb.0:
38; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
39; CHECK-NEXT:    // kill: def $d0 killed $d0 def $q0
40; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
41; CHECK-NEXT:    bl sinf
42; CHECK-NEXT:    // kill: def $s0 killed $s0 def $d0
43; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
44; CHECK-NEXT:    ret
45  %r = call <1 x float> @llvm.sin.v1f32(<1 x float> %x)
46  ret <1 x float> %r
47}
48
49define <2 x float> @sin_v2f32(<2 x float> %x) nounwind {
50; CHECK-LABEL: sin_v2f32:
51; CHECK:       // %bb.0:
52; CHECK-NEXT:    sub sp, sp, #48 // =48
53; CHECK-NEXT:    // kill: def $d0 killed $d0 def $q0
54; CHECK-NEXT:    str q0, [sp] // 16-byte Folded Spill
55; CHECK-NEXT:    mov s0, v0.s[1]
56; CHECK-NEXT:    str x30, [sp, #32] // 8-byte Folded Spill
57; CHECK-NEXT:    bl sinf
58; CHECK-NEXT:    str d0, [sp, #16] // 16-byte Folded Spill
59; CHECK-NEXT:    ldr q0, [sp] // 16-byte Folded Reload
60; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
61; CHECK-NEXT:    bl sinf
62; CHECK-NEXT:    ldr q1, [sp, #16] // 16-byte Folded Reload
63; CHECK-NEXT:    ldr x30, [sp, #32] // 8-byte Folded Reload
64; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
65; CHECK-NEXT:    mov v0.s[1], v1.s[0]
66; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $q0
67; CHECK-NEXT:    add sp, sp, #48 // =48
68; CHECK-NEXT:    ret
69  %r = call <2 x float> @llvm.sin.v2f32(<2 x float> %x)
70  ret <2 x float> %r
71}
72
73define <3 x float> @sin_v3f32(<3 x float> %x) nounwind {
74; CHECK-LABEL: sin_v3f32:
75; CHECK:       // %bb.0:
76; CHECK-NEXT:    sub sp, sp, #48 // =48
77; CHECK-NEXT:    str q0, [sp, #16] // 16-byte Folded Spill
78; CHECK-NEXT:    mov s0, v0.s[1]
79; CHECK-NEXT:    str x30, [sp, #32] // 8-byte Folded Spill
80; CHECK-NEXT:    bl sinf
81; CHECK-NEXT:    str d0, [sp] // 16-byte Folded Spill
82; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
83; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
84; CHECK-NEXT:    bl sinf
85; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
86; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
87; CHECK-NEXT:    mov v0.s[1], v1.s[0]
88; CHECK-NEXT:    str q0, [sp] // 16-byte Folded Spill
89; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
90; CHECK-NEXT:    mov s0, v0.s[2]
91; CHECK-NEXT:    bl sinf
92; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
93; CHECK-NEXT:    ldr x30, [sp, #32] // 8-byte Folded Reload
94; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
95; CHECK-NEXT:    mov v1.s[2], v0.s[0]
96; CHECK-NEXT:    mov v0.16b, v1.16b
97; CHECK-NEXT:    add sp, sp, #48 // =48
98; CHECK-NEXT:    ret
99  %r = call <3 x float> @llvm.sin.v3f32(<3 x float> %x)
100  ret <3 x float> %r
101}
102
103define <4 x float> @sin_v4f32(<4 x float> %x) nounwind {
104; CHECK-LABEL: sin_v4f32:
105; CHECK:       // %bb.0:
106; CHECK-NEXT:    sub sp, sp, #48 // =48
107; CHECK-NEXT:    str q0, [sp, #16] // 16-byte Folded Spill
108; CHECK-NEXT:    mov s0, v0.s[1]
109; CHECK-NEXT:    str x30, [sp, #32] // 8-byte Folded Spill
110; CHECK-NEXT:    bl sinf
111; CHECK-NEXT:    str d0, [sp] // 16-byte Folded Spill
112; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
113; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
114; CHECK-NEXT:    bl sinf
115; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
116; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
117; CHECK-NEXT:    mov v0.s[1], v1.s[0]
118; CHECK-NEXT:    str q0, [sp] // 16-byte Folded Spill
119; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
120; CHECK-NEXT:    mov s0, v0.s[2]
121; CHECK-NEXT:    bl sinf
122; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
123; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
124; CHECK-NEXT:    mov v1.s[2], v0.s[0]
125; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
126; CHECK-NEXT:    str q1, [sp] // 16-byte Folded Spill
127; CHECK-NEXT:    mov s0, v0.s[3]
128; CHECK-NEXT:    bl sinf
129; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
130; CHECK-NEXT:    ldr x30, [sp, #32] // 8-byte Folded Reload
131; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
132; CHECK-NEXT:    mov v1.s[3], v0.s[0]
133; CHECK-NEXT:    mov v0.16b, v1.16b
134; CHECK-NEXT:    add sp, sp, #48 // =48
135; CHECK-NEXT:    ret
136  %r = call <4 x float> @llvm.sin.v4f32(<4 x float> %x)
137  ret <4 x float> %r
138}
139
140define <5 x float> @sin_v5f32(<5 x float> %x) nounwind {
141; CHECK-LABEL: sin_v5f32:
142; CHECK:       // %bb.0:
143; CHECK-NEXT:    str d12, [sp, #-48]! // 8-byte Folded Spill
144; CHECK-NEXT:    stp d11, d10, [sp, #8] // 16-byte Folded Spill
145; CHECK-NEXT:    stp d9, d8, [sp, #24] // 16-byte Folded Spill
146; CHECK-NEXT:    str x30, [sp, #40] // 8-byte Folded Spill
147; CHECK-NEXT:    mov v8.16b, v4.16b
148; CHECK-NEXT:    mov v9.16b, v3.16b
149; CHECK-NEXT:    mov v10.16b, v2.16b
150; CHECK-NEXT:    mov v11.16b, v1.16b
151; CHECK-NEXT:    bl sinf
152; CHECK-NEXT:    mov v12.16b, v0.16b
153; CHECK-NEXT:    mov v0.16b, v11.16b
154; CHECK-NEXT:    bl sinf
155; CHECK-NEXT:    mov v11.16b, v0.16b
156; CHECK-NEXT:    mov v0.16b, v10.16b
157; CHECK-NEXT:    bl sinf
158; CHECK-NEXT:    mov v10.16b, v0.16b
159; CHECK-NEXT:    mov v0.16b, v9.16b
160; CHECK-NEXT:    bl sinf
161; CHECK-NEXT:    mov v9.16b, v0.16b
162; CHECK-NEXT:    mov v0.16b, v8.16b
163; CHECK-NEXT:    bl sinf
164; CHECK-NEXT:    mov v1.16b, v11.16b
165; CHECK-NEXT:    mov v2.16b, v10.16b
166; CHECK-NEXT:    mov v3.16b, v9.16b
167; CHECK-NEXT:    ldr x30, [sp, #40] // 8-byte Folded Reload
168; CHECK-NEXT:    ldp d9, d8, [sp, #24] // 16-byte Folded Reload
169; CHECK-NEXT:    ldp d11, d10, [sp, #8] // 16-byte Folded Reload
170; CHECK-NEXT:    mov v4.16b, v0.16b
171; CHECK-NEXT:    mov v0.16b, v12.16b
172; CHECK-NEXT:    ldr d12, [sp], #48 // 8-byte Folded Reload
173; CHECK-NEXT:    ret
174  %r = call <5 x float> @llvm.sin.v5f32(<5 x float> %x)
175  ret <5 x float> %r
176}
177
178define <6 x float> @sin_v6f32(<6 x float> %x) nounwind {
179; CHECK-LABEL: sin_v6f32:
180; CHECK:       // %bb.0:
181; CHECK-NEXT:    stp d13, d12, [sp, #-64]! // 16-byte Folded Spill
182; CHECK-NEXT:    stp d11, d10, [sp, #16] // 16-byte Folded Spill
183; CHECK-NEXT:    stp d9, d8, [sp, #32] // 16-byte Folded Spill
184; CHECK-NEXT:    str x30, [sp, #48] // 8-byte Folded Spill
185; CHECK-NEXT:    mov v8.16b, v5.16b
186; CHECK-NEXT:    mov v9.16b, v4.16b
187; CHECK-NEXT:    mov v10.16b, v3.16b
188; CHECK-NEXT:    mov v11.16b, v2.16b
189; CHECK-NEXT:    mov v12.16b, v1.16b
190; CHECK-NEXT:    bl sinf
191; CHECK-NEXT:    mov v13.16b, v0.16b
192; CHECK-NEXT:    mov v0.16b, v12.16b
193; CHECK-NEXT:    bl sinf
194; CHECK-NEXT:    mov v12.16b, v0.16b
195; CHECK-NEXT:    mov v0.16b, v11.16b
196; CHECK-NEXT:    bl sinf
197; CHECK-NEXT:    mov v11.16b, v0.16b
198; CHECK-NEXT:    mov v0.16b, v10.16b
199; CHECK-NEXT:    bl sinf
200; CHECK-NEXT:    mov v10.16b, v0.16b
201; CHECK-NEXT:    mov v0.16b, v9.16b
202; CHECK-NEXT:    bl sinf
203; CHECK-NEXT:    mov v9.16b, v0.16b
204; CHECK-NEXT:    mov v0.16b, v8.16b
205; CHECK-NEXT:    bl sinf
206; CHECK-NEXT:    mov v2.16b, v11.16b
207; CHECK-NEXT:    mov v3.16b, v10.16b
208; CHECK-NEXT:    mov v4.16b, v9.16b
209; CHECK-NEXT:    ldr x30, [sp, #48] // 8-byte Folded Reload
210; CHECK-NEXT:    ldp d9, d8, [sp, #32] // 16-byte Folded Reload
211; CHECK-NEXT:    ldp d11, d10, [sp, #16] // 16-byte Folded Reload
212; CHECK-NEXT:    mov v5.16b, v0.16b
213; CHECK-NEXT:    mov v0.16b, v13.16b
214; CHECK-NEXT:    mov v1.16b, v12.16b
215; CHECK-NEXT:    ldp d13, d12, [sp], #64 // 16-byte Folded Reload
216; CHECK-NEXT:    ret
217  %r = call <6 x float> @llvm.sin.v6f32(<6 x float> %x)
218  ret <6 x float> %r
219}
220
221define <3 x double> @sin_v3f64(<3 x double> %x) nounwind {
222; CHECK-LABEL: sin_v3f64:
223; CHECK:       // %bb.0:
224; CHECK-NEXT:    str d10, [sp, #-32]! // 8-byte Folded Spill
225; CHECK-NEXT:    stp d9, d8, [sp, #8] // 16-byte Folded Spill
226; CHECK-NEXT:    str x30, [sp, #24] // 8-byte Folded Spill
227; CHECK-NEXT:    mov v8.16b, v2.16b
228; CHECK-NEXT:    mov v9.16b, v1.16b
229; CHECK-NEXT:    bl sin
230; CHECK-NEXT:    mov v10.16b, v0.16b
231; CHECK-NEXT:    mov v0.16b, v9.16b
232; CHECK-NEXT:    bl sin
233; CHECK-NEXT:    mov v9.16b, v0.16b
234; CHECK-NEXT:    mov v0.16b, v8.16b
235; CHECK-NEXT:    bl sin
236; CHECK-NEXT:    mov v1.16b, v9.16b
237; CHECK-NEXT:    ldr x30, [sp, #24] // 8-byte Folded Reload
238; CHECK-NEXT:    ldp d9, d8, [sp, #8] // 16-byte Folded Reload
239; CHECK-NEXT:    mov v2.16b, v0.16b
240; CHECK-NEXT:    mov v0.16b, v10.16b
241; CHECK-NEXT:    ldr d10, [sp], #32 // 8-byte Folded Reload
242; CHECK-NEXT:    ret
243  %r = call <3 x double> @llvm.sin.v3f64(<3 x double> %x)
244  ret <3 x double> %r
245}
246
247define <3 x float> @fabs_v3f32(<3 x float> %x) nounwind {
248; CHECK-LABEL: fabs_v3f32:
249; CHECK:       // %bb.0:
250; CHECK-NEXT:    fabs v0.4s, v0.4s
251; CHECK-NEXT:    ret
252  %r = call <3 x float> @llvm.fabs.v3f32(<3 x float> %x)
253  ret <3 x float> %r
254}
255
256define <3 x float> @ceil_v3f32(<3 x float> %x) nounwind {
257; CHECK-LABEL: ceil_v3f32:
258; CHECK:       // %bb.0:
259; CHECK-NEXT:    frintp v0.4s, v0.4s
260; CHECK-NEXT:    ret
261  %r = call <3 x float> @llvm.ceil.v3f32(<3 x float> %x)
262  ret <3 x float> %r
263}
264
265define <3 x float> @cos_v3f32(<3 x float> %x) nounwind {
266; CHECK-LABEL: cos_v3f32:
267; CHECK:       // %bb.0:
268; CHECK-NEXT:    sub sp, sp, #48 // =48
269; CHECK-NEXT:    str q0, [sp, #16] // 16-byte Folded Spill
270; CHECK-NEXT:    mov s0, v0.s[1]
271; CHECK-NEXT:    str x30, [sp, #32] // 8-byte Folded Spill
272; CHECK-NEXT:    bl cosf
273; CHECK-NEXT:    str d0, [sp] // 16-byte Folded Spill
274; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
275; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
276; CHECK-NEXT:    bl cosf
277; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
278; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
279; CHECK-NEXT:    mov v0.s[1], v1.s[0]
280; CHECK-NEXT:    str q0, [sp] // 16-byte Folded Spill
281; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
282; CHECK-NEXT:    mov s0, v0.s[2]
283; CHECK-NEXT:    bl cosf
284; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
285; CHECK-NEXT:    ldr x30, [sp, #32] // 8-byte Folded Reload
286; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
287; CHECK-NEXT:    mov v1.s[2], v0.s[0]
288; CHECK-NEXT:    mov v0.16b, v1.16b
289; CHECK-NEXT:    add sp, sp, #48 // =48
290; CHECK-NEXT:    ret
291  %r = call <3 x float> @llvm.cos.v3f32(<3 x float> %x)
292  ret <3 x float> %r
293}
294
295define <3 x float> @exp_v3f32(<3 x float> %x) nounwind {
296; CHECK-LABEL: exp_v3f32:
297; CHECK:       // %bb.0:
298; CHECK-NEXT:    sub sp, sp, #48 // =48
299; CHECK-NEXT:    str q0, [sp, #16] // 16-byte Folded Spill
300; CHECK-NEXT:    mov s0, v0.s[1]
301; CHECK-NEXT:    str x30, [sp, #32] // 8-byte Folded Spill
302; CHECK-NEXT:    bl expf
303; CHECK-NEXT:    str d0, [sp] // 16-byte Folded Spill
304; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
305; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
306; CHECK-NEXT:    bl expf
307; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
308; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
309; CHECK-NEXT:    mov v0.s[1], v1.s[0]
310; CHECK-NEXT:    str q0, [sp] // 16-byte Folded Spill
311; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
312; CHECK-NEXT:    mov s0, v0.s[2]
313; CHECK-NEXT:    bl expf
314; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
315; CHECK-NEXT:    ldr x30, [sp, #32] // 8-byte Folded Reload
316; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
317; CHECK-NEXT:    mov v1.s[2], v0.s[0]
318; CHECK-NEXT:    mov v0.16b, v1.16b
319; CHECK-NEXT:    add sp, sp, #48 // =48
320; CHECK-NEXT:    ret
321  %r = call <3 x float> @llvm.exp.v3f32(<3 x float> %x)
322  ret <3 x float> %r
323}
324
325define <3 x float> @exp2_v3f32(<3 x float> %x) nounwind {
326; CHECK-LABEL: exp2_v3f32:
327; CHECK:       // %bb.0:
328; CHECK-NEXT:    sub sp, sp, #48 // =48
329; CHECK-NEXT:    str q0, [sp, #16] // 16-byte Folded Spill
330; CHECK-NEXT:    mov s0, v0.s[1]
331; CHECK-NEXT:    str x30, [sp, #32] // 8-byte Folded Spill
332; CHECK-NEXT:    bl exp2f
333; CHECK-NEXT:    str d0, [sp] // 16-byte Folded Spill
334; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
335; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
336; CHECK-NEXT:    bl exp2f
337; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
338; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
339; CHECK-NEXT:    mov v0.s[1], v1.s[0]
340; CHECK-NEXT:    str q0, [sp] // 16-byte Folded Spill
341; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
342; CHECK-NEXT:    mov s0, v0.s[2]
343; CHECK-NEXT:    bl exp2f
344; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
345; CHECK-NEXT:    ldr x30, [sp, #32] // 8-byte Folded Reload
346; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
347; CHECK-NEXT:    mov v1.s[2], v0.s[0]
348; CHECK-NEXT:    mov v0.16b, v1.16b
349; CHECK-NEXT:    add sp, sp, #48 // =48
350; CHECK-NEXT:    ret
351  %r = call <3 x float> @llvm.exp2.v3f32(<3 x float> %x)
352  ret <3 x float> %r
353}
354
355define <3 x float> @floor_v3f32(<3 x float> %x) nounwind {
356; CHECK-LABEL: floor_v3f32:
357; CHECK:       // %bb.0:
358; CHECK-NEXT:    frintm v0.4s, v0.4s
359; CHECK-NEXT:    ret
360  %r = call <3 x float> @llvm.floor.v3f32(<3 x float> %x)
361  ret <3 x float> %r
362}
363
364define <3 x float> @log_v3f32(<3 x float> %x) nounwind {
365; CHECK-LABEL: log_v3f32:
366; CHECK:       // %bb.0:
367; CHECK-NEXT:    sub sp, sp, #48 // =48
368; CHECK-NEXT:    str q0, [sp, #16] // 16-byte Folded Spill
369; CHECK-NEXT:    mov s0, v0.s[1]
370; CHECK-NEXT:    str x30, [sp, #32] // 8-byte Folded Spill
371; CHECK-NEXT:    bl logf
372; CHECK-NEXT:    str d0, [sp] // 16-byte Folded Spill
373; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
374; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
375; CHECK-NEXT:    bl logf
376; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
377; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
378; CHECK-NEXT:    mov v0.s[1], v1.s[0]
379; CHECK-NEXT:    str q0, [sp] // 16-byte Folded Spill
380; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
381; CHECK-NEXT:    mov s0, v0.s[2]
382; CHECK-NEXT:    bl logf
383; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
384; CHECK-NEXT:    ldr x30, [sp, #32] // 8-byte Folded Reload
385; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
386; CHECK-NEXT:    mov v1.s[2], v0.s[0]
387; CHECK-NEXT:    mov v0.16b, v1.16b
388; CHECK-NEXT:    add sp, sp, #48 // =48
389; CHECK-NEXT:    ret
390  %r = call <3 x float> @llvm.log.v3f32(<3 x float> %x)
391  ret <3 x float> %r
392}
393
394define <3 x float> @log10_v3f32(<3 x float> %x) nounwind {
395; CHECK-LABEL: log10_v3f32:
396; CHECK:       // %bb.0:
397; CHECK-NEXT:    sub sp, sp, #48 // =48
398; CHECK-NEXT:    str q0, [sp, #16] // 16-byte Folded Spill
399; CHECK-NEXT:    mov s0, v0.s[1]
400; CHECK-NEXT:    str x30, [sp, #32] // 8-byte Folded Spill
401; CHECK-NEXT:    bl log10f
402; CHECK-NEXT:    str d0, [sp] // 16-byte Folded Spill
403; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
404; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
405; CHECK-NEXT:    bl log10f
406; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
407; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
408; CHECK-NEXT:    mov v0.s[1], v1.s[0]
409; CHECK-NEXT:    str q0, [sp] // 16-byte Folded Spill
410; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
411; CHECK-NEXT:    mov s0, v0.s[2]
412; CHECK-NEXT:    bl log10f
413; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
414; CHECK-NEXT:    ldr x30, [sp, #32] // 8-byte Folded Reload
415; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
416; CHECK-NEXT:    mov v1.s[2], v0.s[0]
417; CHECK-NEXT:    mov v0.16b, v1.16b
418; CHECK-NEXT:    add sp, sp, #48 // =48
419; CHECK-NEXT:    ret
420  %r = call <3 x float> @llvm.log10.v3f32(<3 x float> %x)
421  ret <3 x float> %r
422}
423
424define <3 x float> @log2_v3f32(<3 x float> %x) nounwind {
425; CHECK-LABEL: log2_v3f32:
426; CHECK:       // %bb.0:
427; CHECK-NEXT:    sub sp, sp, #48 // =48
428; CHECK-NEXT:    str q0, [sp, #16] // 16-byte Folded Spill
429; CHECK-NEXT:    mov s0, v0.s[1]
430; CHECK-NEXT:    str x30, [sp, #32] // 8-byte Folded Spill
431; CHECK-NEXT:    bl log2f
432; CHECK-NEXT:    str d0, [sp] // 16-byte Folded Spill
433; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
434; CHECK-NEXT:    // kill: def $s0 killed $s0 killed $q0
435; CHECK-NEXT:    bl log2f
436; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
437; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
438; CHECK-NEXT:    mov v0.s[1], v1.s[0]
439; CHECK-NEXT:    str q0, [sp] // 16-byte Folded Spill
440; CHECK-NEXT:    ldr q0, [sp, #16] // 16-byte Folded Reload
441; CHECK-NEXT:    mov s0, v0.s[2]
442; CHECK-NEXT:    bl log2f
443; CHECK-NEXT:    ldr q1, [sp] // 16-byte Folded Reload
444; CHECK-NEXT:    ldr x30, [sp, #32] // 8-byte Folded Reload
445; CHECK-NEXT:    // kill: def $s0 killed $s0 def $q0
446; CHECK-NEXT:    mov v1.s[2], v0.s[0]
447; CHECK-NEXT:    mov v0.16b, v1.16b
448; CHECK-NEXT:    add sp, sp, #48 // =48
449; CHECK-NEXT:    ret
450  %r = call <3 x float> @llvm.log2.v3f32(<3 x float> %x)
451  ret <3 x float> %r
452}
453
454define <3 x float> @nearbyint__v3f32(<3 x float> %x) nounwind {
455; CHECK-LABEL: nearbyint__v3f32:
456; CHECK:       // %bb.0:
457; CHECK-NEXT:    frinti v0.4s, v0.4s
458; CHECK-NEXT:    ret
459  %r = call <3 x float> @llvm.nearbyint.v3f32(<3 x float> %x)
460  ret <3 x float> %r
461}
462
463define <3 x float> @rint_v3f32(<3 x float> %x) nounwind {
464; CHECK-LABEL: rint_v3f32:
465; CHECK:       // %bb.0:
466; CHECK-NEXT:    frintx v0.4s, v0.4s
467; CHECK-NEXT:    ret
468  %r = call <3 x float> @llvm.rint.v3f32(<3 x float> %x)
469  ret <3 x float> %r
470}
471
472define <3 x float> @round_v3f32(<3 x float> %x) nounwind {
473; CHECK-LABEL: round_v3f32:
474; CHECK:       // %bb.0:
475; CHECK-NEXT:    frinta v0.4s, v0.4s
476; CHECK-NEXT:    ret
477  %r = call <3 x float> @llvm.round.v3f32(<3 x float> %x)
478  ret <3 x float> %r
479}
480
481define <3 x float> @sqrt_v3f32(<3 x float> %x) nounwind {
482; CHECK-LABEL: sqrt_v3f32:
483; CHECK:       // %bb.0:
484; CHECK-NEXT:    fsqrt v0.4s, v0.4s
485; CHECK-NEXT:    ret
486  %r = call <3 x float> @llvm.sqrt.v3f32(<3 x float> %x)
487  ret <3 x float> %r
488}
489
490define <3 x float> @trunc_v3f32(<3 x float> %x) nounwind {
491; CHECK-LABEL: trunc_v3f32:
492; CHECK:       // %bb.0:
493; CHECK-NEXT:    frintz v0.4s, v0.4s
494; CHECK-NEXT:    ret
495  %r = call <3 x float> @llvm.trunc.v3f32(<3 x float> %x)
496  ret <3 x float> %r
497}
498
499