1 ; RUN: llc < %s -mtriple=aarch64 -mattr=+neon | FileCheck %s
2 ; RUN: llc < %s -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel* -mtriple=aarch64 | FileCheck %s --check-prefixes=FALLBACK,CHECK
4 ; CHECK-LABEL: testmsws:
5 ; CHECK: frintx [[REG:s[0-9]]], s0
6 ; CHECK-NEXT: fcvtzs x0, [[REG]]
8 ; FALLBACK-NOT: remark{{.*}}testmsws
9 define i32 @testmsws(float %x) {
11 %0 = tail call i64 @llvm.lrint.i64.f32(float %x)
12 %conv = trunc i64 %0 to i32
16 ; CHECK-LABEL: testmsxs:
17 ; CHECK: frintx [[REG:s[0-9]]], s0
18 ; CHECK-NEXT: fcvtzs x0, [[REG]]
20 ; FALLBACK-NOT: remark{{.*}}testmsxs
21 define i64 @testmsxs(float %x) {
23 %0 = tail call i64 @llvm.lrint.i64.f32(float %x)
27 ; CHECK-LABEL: testmswd:
28 ; CHECK: frintx [[REG:d[0-9]]], d0
29 ; CHECK-NEXT: fcvtzs x0, [[REG]]
31 ; FALLBACK-NOT: remark{{.*}}testmswd
32 define i32 @testmswd(double %x) {
34 %0 = tail call i64 @llvm.lrint.i64.f64(double %x)
35 %conv = trunc i64 %0 to i32
39 ; CHECK-LABEL: testmsxd:
40 ; CHECK: frintx [[REG:d[0-9]]], d0
41 ; CHECK-NEXT: fcvtzs x0, [[REG]]
43 ; FALLBACK-NOT: remark{{.*}}testmsxd
44 define i64 @testmsxd(double %x) {
46 %0 = tail call i64 @llvm.lrint.i64.f64(double %x)
50 ; CHECK-LABEL: testmswl:
52 define dso_local i32 @testmswl(fp128 %x) {
54 %0 = tail call i64 @llvm.lrint.i64.f128(fp128 %x)
55 %conv = trunc i64 %0 to i32
59 ; CHECK-LABEL: testmsll:
61 define dso_local i64 @testmsll(fp128 %x) {
63 %0 = tail call i64 @llvm.lrint.i64.f128(fp128 %x)
67 declare i64 @llvm.lrint.i64.f32(float) nounwind readnone
68 declare i64 @llvm.lrint.i64.f64(double) nounwind readnone
69 declare i64 @llvm.lrint.i64.f128(fp128) nounwind readnone