1 ; RUN: llc < %s -mtriple=aarch64-windows -mattr=+neon | FileCheck %s
3 ; CHECK-LABEL: testmsxs:
4 ; CHECK: frintx [[SREG:s[0-9]+]], s0
5 ; CHECK-NEXT: fcvtzs [[WREG:w[0-9]+]], [[SREG]]
6 ; CHECK-NEXT: sxtw x0, [[WREG]]
8 define i64 @testmsxs(float %x) {
10 %0 = tail call i32 @llvm.lrint.i32.f32(float %x)
11 %conv = sext i32 %0 to i64
15 ; CHECK-LABEL: testmsws:
16 ; CHECK: frintx [[SREG:s[0-9]+]], s0
17 ; CHECK-NEXT: fcvtzs [[WREG:w[0-9]+]], [[SREG]]
19 define i32 @testmsws(float %x) {
21 %0 = tail call i32 @llvm.lrint.i32.f32(float %x)
25 ; CHECK-LABEL: testmsxd:
26 ; CHECK: frintx [[DREG:d[0-9]+]], d0
27 ; CHECK-NEXT: fcvtzs [[WREG:w[0-9]+]], [[DREG]]
28 ; CHECK-NEXT: sxtw x0, [[WREG]]
30 define i64 @testmsxd(double %x) {
32 %0 = tail call i32 @llvm.lrint.i32.f64(double %x)
33 %conv = sext i32 %0 to i64
37 ; CHECK-LABEL: testmswd:
38 ; CHECK: frintx [[DREG:d[0-9]+]], d0
39 ; CHECK-NEXT: fcvtzs [[WREG:w[0-9]+]], [[DREG]]
41 define i32 @testmswd(double %x) {
43 %0 = tail call i32 @llvm.lrint.i32.f64(double %x)
47 declare i32 @llvm.lrint.i32.f32(float) nounwind readnone
48 declare i32 @llvm.lrint.i32.f64(double) nounwind readnone