1 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple | FileCheck %s
4 ; Floating-point scalar convert to signed integer (to nearest with ties to away)
6 define i32 @fcvtas_1w1s(float %A) nounwind {
7 ;CHECK-LABEL: fcvtas_1w1s:
10 %tmp3 = call i32 @llvm.aarch64.neon.fcvtas.i32.f32(float %A)
14 define i64 @fcvtas_1x1s(float %A) nounwind {
15 ;CHECK-LABEL: fcvtas_1x1s:
18 %tmp3 = call i64 @llvm.aarch64.neon.fcvtas.i64.f32(float %A)
22 define i32 @fcvtas_1w1d(double %A) nounwind {
23 ;CHECK-LABEL: fcvtas_1w1d:
26 %tmp3 = call i32 @llvm.aarch64.neon.fcvtas.i32.f64(double %A)
30 define i64 @fcvtas_1x1d(double %A) nounwind {
31 ;CHECK-LABEL: fcvtas_1x1d:
34 %tmp3 = call i64 @llvm.aarch64.neon.fcvtas.i64.f64(double %A)
38 declare i32 @llvm.aarch64.neon.fcvtas.i32.f32(float) nounwind readnone
39 declare i64 @llvm.aarch64.neon.fcvtas.i64.f32(float) nounwind readnone
40 declare i32 @llvm.aarch64.neon.fcvtas.i32.f64(double) nounwind readnone
41 declare i64 @llvm.aarch64.neon.fcvtas.i64.f64(double) nounwind readnone
44 ; Floating-point scalar convert to unsigned integer
46 define i32 @fcvtau_1w1s(float %A) nounwind {
47 ;CHECK-LABEL: fcvtau_1w1s:
50 %tmp3 = call i32 @llvm.aarch64.neon.fcvtau.i32.f32(float %A)
54 define i64 @fcvtau_1x1s(float %A) nounwind {
55 ;CHECK-LABEL: fcvtau_1x1s:
58 %tmp3 = call i64 @llvm.aarch64.neon.fcvtau.i64.f32(float %A)
62 define i32 @fcvtau_1w1d(double %A) nounwind {
63 ;CHECK-LABEL: fcvtau_1w1d:
66 %tmp3 = call i32 @llvm.aarch64.neon.fcvtau.i32.f64(double %A)
70 define i64 @fcvtau_1x1d(double %A) nounwind {
71 ;CHECK-LABEL: fcvtau_1x1d:
74 %tmp3 = call i64 @llvm.aarch64.neon.fcvtau.i64.f64(double %A)
78 declare i32 @llvm.aarch64.neon.fcvtau.i32.f32(float) nounwind readnone
79 declare i64 @llvm.aarch64.neon.fcvtau.i64.f32(float) nounwind readnone
80 declare i32 @llvm.aarch64.neon.fcvtau.i32.f64(double) nounwind readnone
81 declare i64 @llvm.aarch64.neon.fcvtau.i64.f64(double) nounwind readnone
84 ; Floating-point scalar convert to signed integer (toward -Inf)
86 define i32 @fcvtms_1w1s(float %A) nounwind {
87 ;CHECK-LABEL: fcvtms_1w1s:
90 %tmp3 = call i32 @llvm.aarch64.neon.fcvtms.i32.f32(float %A)
94 define i64 @fcvtms_1x1s(float %A) nounwind {
95 ;CHECK-LABEL: fcvtms_1x1s:
98 %tmp3 = call i64 @llvm.aarch64.neon.fcvtms.i64.f32(float %A)
102 define i32 @fcvtms_1w1d(double %A) nounwind {
103 ;CHECK-LABEL: fcvtms_1w1d:
104 ;CHECK: fcvtms w0, d0
106 %tmp3 = call i32 @llvm.aarch64.neon.fcvtms.i32.f64(double %A)
110 define i64 @fcvtms_1x1d(double %A) nounwind {
111 ;CHECK-LABEL: fcvtms_1x1d:
112 ;CHECK: fcvtms x0, d0
114 %tmp3 = call i64 @llvm.aarch64.neon.fcvtms.i64.f64(double %A)
118 declare i32 @llvm.aarch64.neon.fcvtms.i32.f32(float) nounwind readnone
119 declare i64 @llvm.aarch64.neon.fcvtms.i64.f32(float) nounwind readnone
120 declare i32 @llvm.aarch64.neon.fcvtms.i32.f64(double) nounwind readnone
121 declare i64 @llvm.aarch64.neon.fcvtms.i64.f64(double) nounwind readnone
124 ; Floating-point scalar convert to unsigned integer (toward -Inf)
126 define i32 @fcvtmu_1w1s(float %A) nounwind {
127 ;CHECK-LABEL: fcvtmu_1w1s:
128 ;CHECK: fcvtmu w0, s0
130 %tmp3 = call i32 @llvm.aarch64.neon.fcvtmu.i32.f32(float %A)
134 define i64 @fcvtmu_1x1s(float %A) nounwind {
135 ;CHECK-LABEL: fcvtmu_1x1s:
136 ;CHECK: fcvtmu x0, s0
138 %tmp3 = call i64 @llvm.aarch64.neon.fcvtmu.i64.f32(float %A)
142 define i32 @fcvtmu_1w1d(double %A) nounwind {
143 ;CHECK-LABEL: fcvtmu_1w1d:
144 ;CHECK: fcvtmu w0, d0
146 %tmp3 = call i32 @llvm.aarch64.neon.fcvtmu.i32.f64(double %A)
150 define i64 @fcvtmu_1x1d(double %A) nounwind {
151 ;CHECK-LABEL: fcvtmu_1x1d:
152 ;CHECK: fcvtmu x0, d0
154 %tmp3 = call i64 @llvm.aarch64.neon.fcvtmu.i64.f64(double %A)
158 declare i32 @llvm.aarch64.neon.fcvtmu.i32.f32(float) nounwind readnone
159 declare i64 @llvm.aarch64.neon.fcvtmu.i64.f32(float) nounwind readnone
160 declare i32 @llvm.aarch64.neon.fcvtmu.i32.f64(double) nounwind readnone
161 declare i64 @llvm.aarch64.neon.fcvtmu.i64.f64(double) nounwind readnone
164 ; Floating-point scalar convert to signed integer (to nearest with ties to even)
166 define i32 @fcvtns_1w1s(float %A) nounwind {
167 ;CHECK-LABEL: fcvtns_1w1s:
168 ;CHECK: fcvtns w0, s0
170 %tmp3 = call i32 @llvm.aarch64.neon.fcvtns.i32.f32(float %A)
174 define i64 @fcvtns_1x1s(float %A) nounwind {
175 ;CHECK-LABEL: fcvtns_1x1s:
176 ;CHECK: fcvtns x0, s0
178 %tmp3 = call i64 @llvm.aarch64.neon.fcvtns.i64.f32(float %A)
182 define i32 @fcvtns_1w1d(double %A) nounwind {
183 ;CHECK-LABEL: fcvtns_1w1d:
184 ;CHECK: fcvtns w0, d0
186 %tmp3 = call i32 @llvm.aarch64.neon.fcvtns.i32.f64(double %A)
190 define i64 @fcvtns_1x1d(double %A) nounwind {
191 ;CHECK-LABEL: fcvtns_1x1d:
192 ;CHECK: fcvtns x0, d0
194 %tmp3 = call i64 @llvm.aarch64.neon.fcvtns.i64.f64(double %A)
198 declare i32 @llvm.aarch64.neon.fcvtns.i32.f32(float) nounwind readnone
199 declare i64 @llvm.aarch64.neon.fcvtns.i64.f32(float) nounwind readnone
200 declare i32 @llvm.aarch64.neon.fcvtns.i32.f64(double) nounwind readnone
201 declare i64 @llvm.aarch64.neon.fcvtns.i64.f64(double) nounwind readnone
204 ; Floating-point scalar convert to unsigned integer (to nearest with ties to even)
206 define i32 @fcvtnu_1w1s(float %A) nounwind {
207 ;CHECK-LABEL: fcvtnu_1w1s:
208 ;CHECK: fcvtnu w0, s0
210 %tmp3 = call i32 @llvm.aarch64.neon.fcvtnu.i32.f32(float %A)
214 define i64 @fcvtnu_1x1s(float %A) nounwind {
215 ;CHECK-LABEL: fcvtnu_1x1s:
216 ;CHECK: fcvtnu x0, s0
218 %tmp3 = call i64 @llvm.aarch64.neon.fcvtnu.i64.f32(float %A)
222 define i32 @fcvtnu_1w1d(double %A) nounwind {
223 ;CHECK-LABEL: fcvtnu_1w1d:
224 ;CHECK: fcvtnu w0, d0
226 %tmp3 = call i32 @llvm.aarch64.neon.fcvtnu.i32.f64(double %A)
230 define i64 @fcvtnu_1x1d(double %A) nounwind {
231 ;CHECK-LABEL: fcvtnu_1x1d:
232 ;CHECK: fcvtnu x0, d0
234 %tmp3 = call i64 @llvm.aarch64.neon.fcvtnu.i64.f64(double %A)
238 declare i32 @llvm.aarch64.neon.fcvtnu.i32.f32(float) nounwind readnone
239 declare i64 @llvm.aarch64.neon.fcvtnu.i64.f32(float) nounwind readnone
240 declare i32 @llvm.aarch64.neon.fcvtnu.i32.f64(double) nounwind readnone
241 declare i64 @llvm.aarch64.neon.fcvtnu.i64.f64(double) nounwind readnone
244 ; Floating-point scalar convert to signed integer (toward +Inf)
246 define i32 @fcvtps_1w1s(float %A) nounwind {
247 ;CHECK-LABEL: fcvtps_1w1s:
248 ;CHECK: fcvtps w0, s0
250 %tmp3 = call i32 @llvm.aarch64.neon.fcvtps.i32.f32(float %A)
254 define i64 @fcvtps_1x1s(float %A) nounwind {
255 ;CHECK-LABEL: fcvtps_1x1s:
256 ;CHECK: fcvtps x0, s0
258 %tmp3 = call i64 @llvm.aarch64.neon.fcvtps.i64.f32(float %A)
262 define i32 @fcvtps_1w1d(double %A) nounwind {
263 ;CHECK-LABEL: fcvtps_1w1d:
264 ;CHECK: fcvtps w0, d0
266 %tmp3 = call i32 @llvm.aarch64.neon.fcvtps.i32.f64(double %A)
270 define i64 @fcvtps_1x1d(double %A) nounwind {
271 ;CHECK-LABEL: fcvtps_1x1d:
272 ;CHECK: fcvtps x0, d0
274 %tmp3 = call i64 @llvm.aarch64.neon.fcvtps.i64.f64(double %A)
278 declare i32 @llvm.aarch64.neon.fcvtps.i32.f32(float) nounwind readnone
279 declare i64 @llvm.aarch64.neon.fcvtps.i64.f32(float) nounwind readnone
280 declare i32 @llvm.aarch64.neon.fcvtps.i32.f64(double) nounwind readnone
281 declare i64 @llvm.aarch64.neon.fcvtps.i64.f64(double) nounwind readnone
284 ; Floating-point scalar convert to unsigned integer (toward +Inf)
286 define i32 @fcvtpu_1w1s(float %A) nounwind {
287 ;CHECK-LABEL: fcvtpu_1w1s:
288 ;CHECK: fcvtpu w0, s0
290 %tmp3 = call i32 @llvm.aarch64.neon.fcvtpu.i32.f32(float %A)
294 define i64 @fcvtpu_1x1s(float %A) nounwind {
295 ;CHECK-LABEL: fcvtpu_1x1s:
296 ;CHECK: fcvtpu x0, s0
298 %tmp3 = call i64 @llvm.aarch64.neon.fcvtpu.i64.f32(float %A)
302 define i32 @fcvtpu_1w1d(double %A) nounwind {
303 ;CHECK-LABEL: fcvtpu_1w1d:
304 ;CHECK: fcvtpu w0, d0
306 %tmp3 = call i32 @llvm.aarch64.neon.fcvtpu.i32.f64(double %A)
310 define i64 @fcvtpu_1x1d(double %A) nounwind {
311 ;CHECK-LABEL: fcvtpu_1x1d:
312 ;CHECK: fcvtpu x0, d0
314 %tmp3 = call i64 @llvm.aarch64.neon.fcvtpu.i64.f64(double %A)
318 declare i32 @llvm.aarch64.neon.fcvtpu.i32.f32(float) nounwind readnone
319 declare i64 @llvm.aarch64.neon.fcvtpu.i64.f32(float) nounwind readnone
320 declare i32 @llvm.aarch64.neon.fcvtpu.i32.f64(double) nounwind readnone
321 declare i64 @llvm.aarch64.neon.fcvtpu.i64.f64(double) nounwind readnone
324 ; Floating-point scalar convert to signed integer (toward zero)
326 define i32 @fcvtzs_1w1s(float %A) nounwind {
327 ;CHECK-LABEL: fcvtzs_1w1s:
328 ;CHECK: fcvtzs w0, s0
330 %tmp3 = call i32 @llvm.aarch64.neon.fcvtzs.i32.f32(float %A)
334 define i64 @fcvtzs_1x1s(float %A) nounwind {
335 ;CHECK-LABEL: fcvtzs_1x1s:
336 ;CHECK: fcvtzs x0, s0
338 %tmp3 = call i64 @llvm.aarch64.neon.fcvtzs.i64.f32(float %A)
342 define i32 @fcvtzs_1w1d(double %A) nounwind {
343 ;CHECK-LABEL: fcvtzs_1w1d:
344 ;CHECK: fcvtzs w0, d0
346 %tmp3 = call i32 @llvm.aarch64.neon.fcvtzs.i32.f64(double %A)
350 define i64 @fcvtzs_1x1d(double %A) nounwind {
351 ;CHECK-LABEL: fcvtzs_1x1d:
352 ;CHECK: fcvtzs x0, d0
354 %tmp3 = call i64 @llvm.aarch64.neon.fcvtzs.i64.f64(double %A)
358 declare i32 @llvm.aarch64.neon.fcvtzs.i32.f32(float) nounwind readnone
359 declare i64 @llvm.aarch64.neon.fcvtzs.i64.f32(float) nounwind readnone
360 declare i32 @llvm.aarch64.neon.fcvtzs.i32.f64(double) nounwind readnone
361 declare i64 @llvm.aarch64.neon.fcvtzs.i64.f64(double) nounwind readnone
364 ; Floating-point scalar convert to unsigned integer (toward zero)
366 define i32 @fcvtzu_1w1s(float %A) nounwind {
367 ;CHECK-LABEL: fcvtzu_1w1s:
368 ;CHECK: fcvtzu w0, s0
370 %tmp3 = call i32 @llvm.aarch64.neon.fcvtzu.i32.f32(float %A)
374 define i64 @fcvtzu_1x1s(float %A) nounwind {
375 ;CHECK-LABEL: fcvtzu_1x1s:
376 ;CHECK: fcvtzu x0, s0
378 %tmp3 = call i64 @llvm.aarch64.neon.fcvtzu.i64.f32(float %A)
382 define i32 @fcvtzu_1w1d(double %A) nounwind {
383 ;CHECK-LABEL: fcvtzu_1w1d:
384 ;CHECK: fcvtzu w0, d0
386 %tmp3 = call i32 @llvm.aarch64.neon.fcvtzu.i32.f64(double %A)
390 define i64 @fcvtzu_1x1d(double %A) nounwind {
391 ;CHECK-LABEL: fcvtzu_1x1d:
392 ;CHECK: fcvtzu x0, d0
394 %tmp3 = call i64 @llvm.aarch64.neon.fcvtzu.i64.f64(double %A)
398 declare i32 @llvm.aarch64.neon.fcvtzu.i32.f32(float) nounwind readnone
399 declare i64 @llvm.aarch64.neon.fcvtzu.i64.f32(float) nounwind readnone
400 declare i32 @llvm.aarch64.neon.fcvtzu.i32.f64(double) nounwind readnone
401 declare i64 @llvm.aarch64.neon.fcvtzu.i64.f64(double) nounwind readnone