1 ; RUN: llc < %s -mtriple=aarch64 -mattr=+neon | FileCheck %s
3 ; CHECK-LABEL: testmsws:
4 ; CHECK: frintx [[REG:s[0-9]]], s0
5 ; CHECK-NEXT: fcvtzs x0, [[REG]]
7 define i32 @testmsws(float %x) {
9 %0 = tail call i64 @llvm.llrint.f32(float %x)
10 %conv = trunc i64 %0 to i32
14 ; CHECK-LABEL: testmsxs:
15 ; CHECK: frintx [[REG:s[0-9]]], s0
16 ; CHECK-NEXT: fcvtzs x0, [[REG]]
18 define i64 @testmsxs(float %x) {
20 %0 = tail call i64 @llvm.llrint.f32(float %x)
24 ; CHECK-LABEL: testmswd:
25 ; CHECK: frintx [[REG:d[0-9]]], d0
26 ; CHECK-NEXT: fcvtzs x0, [[REG]]
28 define i32 @testmswd(double %x) {
30 %0 = tail call i64 @llvm.llrint.f64(double %x)
31 %conv = trunc i64 %0 to i32
35 ; CHECK-LABEL: testmsxd:
36 ; CHECK: frintx [[REG:d[0-9]]], d0
37 ; CHECK-NEXT: fcvtzs x0, [[REG]]
39 define i64 @testmsxd(double %x) {
41 %0 = tail call i64 @llvm.llrint.f64(double %x)
45 ; CHECK-LABEL: testmswl:
47 define i32 @testmswl(fp128 %x) {
49 %0 = tail call i64 @llvm.llrint.f128(fp128 %x)
50 %conv = trunc i64 %0 to i32
54 ; CHECK-LABEL: testmsll:
56 define i64 @testmsll(fp128 %x) {
58 %0 = tail call i64 @llvm.llrint.f128(fp128 %x)
62 declare i64 @llvm.llrint.f32(float) nounwind readnone
63 declare i64 @llvm.llrint.f64(double) nounwind readnone
64 declare i64 @llvm.llrint.f128(fp128) nounwind readnone