xref: /llvm-project/llvm/test/CodeGen/AArch64/v8.5a-neon-frint3264-intrinsic.ll (revision 3d18c8cd265c0c0bf1d85226c4770a2dd0f86e8f)
1; RUN: llc < %s -mtriple=aarch64 -mattr=+v8.5a  | FileCheck %s
2
3declare <2 x float> @llvm.aarch64.neon.frint32x.v2f32(<2 x float>)
4declare <4 x float> @llvm.aarch64.neon.frint32x.v4f32(<4 x float>)
5declare <2 x float> @llvm.aarch64.neon.frint32z.v2f32(<2 x float>)
6declare <4 x float> @llvm.aarch64.neon.frint32z.v4f32(<4 x float>)
7
8define dso_local <2 x float> @t_vrnd32x_f32(<2 x float> %a) {
9; CHECK-LABEL: t_vrnd32x_f32:
10; CHECK:         frint32x v0.2s, v0.2s
11; CHECK-NEXT:    ret
12entry:
13  %val = tail call <2 x float> @llvm.aarch64.neon.frint32x.v2f32(<2 x float> %a)
14  ret <2 x float> %val
15}
16
17define dso_local <4 x float> @t_vrnd32xq_f32(<4 x float> %a) {
18; CHECK-LABEL: t_vrnd32xq_f32:
19; CHECK:         frint32x v0.4s, v0.4s
20; CHECK-NEXT:    ret
21entry:
22  %val = tail call <4 x float> @llvm.aarch64.neon.frint32x.v4f32(<4 x float> %a)
23  ret <4 x float> %val
24}
25
26define dso_local <2 x float> @t_vrnd32z_f32(<2 x float> %a) {
27; CHECK-LABEL: t_vrnd32z_f32:
28; CHECK:         frint32z v0.2s, v0.2s
29; CHECK-NEXT:    ret
30entry:
31  %val = tail call <2 x float> @llvm.aarch64.neon.frint32z.v2f32(<2 x float> %a)
32  ret <2 x float> %val
33}
34
35define dso_local <4 x float> @t_vrnd32zq_f32(<4 x float> %a) {
36; CHECK-LABEL: t_vrnd32zq_f32:
37; CHECK:         frint32z v0.4s, v0.4s
38; CHECK-NEXT:    ret
39entry:
40  %val = tail call <4 x float> @llvm.aarch64.neon.frint32z.v4f32(<4 x float> %a)
41  ret <4 x float> %val
42}
43
44declare <2 x float> @llvm.aarch64.neon.frint64x.v2f32(<2 x float>)
45declare <4 x float> @llvm.aarch64.neon.frint64x.v4f32(<4 x float>)
46declare <2 x float> @llvm.aarch64.neon.frint64z.v2f32(<2 x float>)
47declare <4 x float> @llvm.aarch64.neon.frint64z.v4f32(<4 x float>)
48
49define dso_local <2 x float> @t_vrnd64x_f32(<2 x float> %a) {
50; CHECK-LABEL: t_vrnd64x_f32:
51; CHECK:         frint64x v0.2s, v0.2s
52; CHECK-NEXT:    ret
53entry:
54  %val = tail call <2 x float> @llvm.aarch64.neon.frint64x.v2f32(<2 x float> %a)
55  ret <2 x float> %val
56}
57
58define dso_local <4 x float> @t_vrnd64xq_f32(<4 x float> %a) {
59; CHECK-LABEL: t_vrnd64xq_f32:
60; CHECK:         frint64x v0.4s, v0.4s
61; CHECK-NEXT:    ret
62entry:
63  %val = tail call <4 x float> @llvm.aarch64.neon.frint64x.v4f32(<4 x float> %a)
64  ret <4 x float> %val
65}
66
67define dso_local <2 x float> @t_vrnd64z_f32(<2 x float> %a) {
68; CHECK-LABEL: t_vrnd64z_f32:
69; CHECK:         frint64z v0.2s, v0.2s
70; CHECK-NEXT:    ret
71entry:
72  %val = tail call <2 x float> @llvm.aarch64.neon.frint64z.v2f32(<2 x float> %a)
73  ret <2 x float> %val
74}
75
76define dso_local <4 x float> @t_vrnd64zq_f32(<4 x float> %a) {
77; CHECK-LABEL: t_vrnd64zq_f32:
78; CHECK:         frint64z v0.4s, v0.4s
79; CHECK-NEXT:    ret
80entry:
81  %val = tail call <4 x float> @llvm.aarch64.neon.frint64z.v4f32(<4 x float> %a)
82  ret <4 x float> %val
83}
84
85declare <1 x double> @llvm.aarch64.neon.frint32x.v1f64(<1 x double>)
86declare <2 x double> @llvm.aarch64.neon.frint32x.v2f64(<2 x double>)
87declare <1 x double> @llvm.aarch64.neon.frint32z.v1f64(<1 x double>)
88declare <2 x double> @llvm.aarch64.neon.frint32z.v2f64(<2 x double>)
89
90define dso_local <1 x double> @t_vrnd32x_f64(<1 x double> %a) {
91; CHECK-LABEL: t_vrnd32x_f64:
92; CHECK:         frint32x d0, d0
93; CHECK-NEXT:    ret
94entry:
95  %val = tail call <1 x double> @llvm.aarch64.neon.frint32x.v1f64(<1 x double> %a)
96  ret <1 x double> %val
97}
98
99define dso_local <2 x double> @t_vrnd32xq_f64(<2 x double> %a) {
100; CHECK-LABEL: t_vrnd32xq_f64:
101; CHECK:         frint32x v0.2d, v0.2d
102; CHECK-NEXT:    ret
103entry:
104  %val = tail call <2 x double> @llvm.aarch64.neon.frint32x.v2f64(<2 x double> %a)
105  ret <2 x double> %val
106}
107
108define dso_local <1 x double> @t_vrnd32z_f64(<1 x double> %a) {
109; CHECK-LABEL: t_vrnd32z_f64:
110; CHECK:         frint32z d0, d0
111; CHECK-NEXT:    ret
112entry:
113  %val = tail call <1 x double> @llvm.aarch64.neon.frint32z.v1f64(<1 x double> %a)
114  ret <1 x double> %val
115}
116
117define dso_local <2 x double> @t_vrnd32zq_f64(<2 x double> %a) {
118; CHECK-LABEL: t_vrnd32zq_f64:
119; CHECK:         frint32z v0.2d, v0.2d
120; CHECK-NEXT:    ret
121entry:
122  %val = tail call <2 x double> @llvm.aarch64.neon.frint32z.v2f64(<2 x double> %a)
123  ret <2 x double> %val
124}
125
126declare <1 x double> @llvm.aarch64.neon.frint64x.v1f64(<1 x double>)
127declare <2 x double> @llvm.aarch64.neon.frint64x.v2f64(<2 x double>)
128declare <1 x double> @llvm.aarch64.neon.frint64z.v1f64(<1 x double>)
129declare <2 x double> @llvm.aarch64.neon.frint64z.v2f64(<2 x double>)
130
131define dso_local <1 x double> @t_vrnd64x_f64(<1 x double> %a) {
132; CHECK-LABEL: t_vrnd64x_f64:
133; CHECK:         frint64x d0, d0
134; CHECK-NEXT:    ret
135entry:
136  %val = tail call <1 x double> @llvm.aarch64.neon.frint64x.v1f64(<1 x double> %a)
137  ret <1 x double> %val
138}
139
140define dso_local <2 x double> @t_vrnd64xq_f64(<2 x double> %a) {
141; CHECK-LABEL: t_vrnd64xq_f64:
142; CHECK:         frint64x v0.2d, v0.2d
143; CHECK-NEXT:    ret
144entry:
145  %val = tail call <2 x double> @llvm.aarch64.neon.frint64x.v2f64(<2 x double> %a)
146  ret <2 x double> %val
147}
148
149define dso_local <1 x double> @t_vrnd64z_f64(<1 x double> %a) {
150; CHECK-LABEL: t_vrnd64z_f64:
151; CHECK:         frint64z d0, d0
152; CHECK-NEXT:    ret
153entry:
154  %val = tail call <1 x double> @llvm.aarch64.neon.frint64z.v1f64(<1 x double> %a)
155  ret <1 x double> %val
156}
157
158define dso_local <2 x double> @t_vrnd64zq_f64(<2 x double> %a) {
159; CHECK-LABEL: t_vrnd64zq_f64:
160; CHECK:         frint64z v0.2d, v0.2d
161; CHECK-NEXT:    ret
162entry:
163  %val = tail call <2 x double> @llvm.aarch64.neon.frint64z.v2f64(<2 x double> %a)
164  ret <2 x double> %val
165}
166