1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -verify-machineinstrs -mtriple aarch64-unknown-unknown -run-pass=legalizer -mattr=-fullfp16 -global-isel %s -o - | FileCheck %s --check-prefix=NOFP16
3 # RUN: llc -verify-machineinstrs -mtriple aarch64-unknown-unknown -run-pass=legalizer -mattr=+fullfp16 -global-isel %s -o - | FileCheck %s --check-prefix=FP16
7 tracksRegLiveness: true
8 machineFunctionInfo: {}
14 %1:_(s16) = G_FRINT %0
16 RET_ReallyLR implicit $h0
22 tracksRegLiveness: true
23 machineFunctionInfo: {}
28 ; NOFP16-LABEL: name: test_f32.rint
29 ; NOFP16: liveins: $s0
31 ; NOFP16-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
32 ; NOFP16-NEXT: [[FRINT:%[0-9]+]]:_(s32) = G_FRINT [[COPY]]
33 ; NOFP16-NEXT: $s0 = COPY [[FRINT]](s32)
34 ; NOFP16-NEXT: RET_ReallyLR implicit $s0
36 ; FP16-LABEL: name: test_f32.rint
39 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
40 ; FP16-NEXT: [[FRINT:%[0-9]+]]:_(s32) = G_FRINT [[COPY]]
41 ; FP16-NEXT: $s0 = COPY [[FRINT]](s32)
42 ; FP16-NEXT: RET_ReallyLR implicit $s0
44 %1:_(s32) = G_FRINT %0
46 RET_ReallyLR implicit $s0
52 tracksRegLiveness: true
53 machineFunctionInfo: {}
58 ; NOFP16-LABEL: name: test_f64.rint
59 ; NOFP16: liveins: $d0
61 ; NOFP16-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $d0
62 ; NOFP16-NEXT: [[FRINT:%[0-9]+]]:_(s64) = G_FRINT [[COPY]]
63 ; NOFP16-NEXT: $d0 = COPY [[FRINT]](s64)
64 ; NOFP16-NEXT: RET_ReallyLR implicit $d0
66 ; FP16-LABEL: name: test_f64.rint
69 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $d0
70 ; FP16-NEXT: [[FRINT:%[0-9]+]]:_(s64) = G_FRINT [[COPY]]
71 ; FP16-NEXT: $d0 = COPY [[FRINT]](s64)
72 ; FP16-NEXT: RET_ReallyLR implicit $d0
74 %1:_(s64) = G_FRINT %0
76 RET_ReallyLR implicit $d0
82 tracksRegLiveness: true
83 machineFunctionInfo: {}
88 ; NOFP16-LABEL: name: test_v4f32.rint
89 ; NOFP16: liveins: $q0
91 ; NOFP16-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
92 ; NOFP16-NEXT: [[FRINT:%[0-9]+]]:_(<4 x s32>) = G_FRINT [[COPY]]
93 ; NOFP16-NEXT: $q0 = COPY [[FRINT]](<4 x s32>)
94 ; NOFP16-NEXT: RET_ReallyLR implicit $q0
96 ; FP16-LABEL: name: test_v4f32.rint
99 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
100 ; FP16-NEXT: [[FRINT:%[0-9]+]]:_(<4 x s32>) = G_FRINT [[COPY]]
101 ; FP16-NEXT: $q0 = COPY [[FRINT]](<4 x s32>)
102 ; FP16-NEXT: RET_ReallyLR implicit $q0
103 %0:_(<4 x s32>) = COPY $q0
104 %1:_(<4 x s32>) = G_FRINT %0
105 $q0 = COPY %1(<4 x s32>)
106 RET_ReallyLR implicit $q0
110 name: test_v2f64.rint
112 tracksRegLiveness: true
113 machineFunctionInfo: {}
118 ; NOFP16-LABEL: name: test_v2f64.rint
119 ; NOFP16: liveins: $q0
120 ; NOFP16-NEXT: {{ $}}
121 ; NOFP16-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
122 ; NOFP16-NEXT: [[FRINT:%[0-9]+]]:_(<2 x s64>) = G_FRINT [[COPY]]
123 ; NOFP16-NEXT: $q0 = COPY [[FRINT]](<2 x s64>)
124 ; NOFP16-NEXT: RET_ReallyLR implicit $q0
126 ; FP16-LABEL: name: test_v2f64.rint
129 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
130 ; FP16-NEXT: [[FRINT:%[0-9]+]]:_(<2 x s64>) = G_FRINT [[COPY]]
131 ; FP16-NEXT: $q0 = COPY [[FRINT]](<2 x s64>)
132 ; FP16-NEXT: RET_ReallyLR implicit $q0
133 %0:_(<2 x s64>) = COPY $q0
134 %1:_(<2 x s64>) = G_FRINT %0
135 $q0 = COPY %1(<2 x s64>)
136 RET_ReallyLR implicit $q0
140 name: test_v4f16.rint
142 tracksRegLiveness: true
143 machineFunctionInfo: {}
148 ; NOFP16-LABEL: name: test_v4f16.rint
149 ; NOFP16: liveins: $d0
150 ; NOFP16-NEXT: {{ $}}
151 ; NOFP16-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
152 ; NOFP16-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[COPY]](<4 x s16>)
153 ; NOFP16-NEXT: [[FRINT:%[0-9]+]]:_(<4 x s32>) = G_FRINT [[FPEXT]]
154 ; NOFP16-NEXT: [[FPTRUNC:%[0-9]+]]:_(<4 x s16>) = G_FPTRUNC [[FRINT]](<4 x s32>)
155 ; NOFP16-NEXT: $d0 = COPY [[FPTRUNC]](<4 x s16>)
156 ; NOFP16-NEXT: RET_ReallyLR implicit $d0
158 ; FP16-LABEL: name: test_v4f16.rint
161 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
162 ; FP16-NEXT: [[FRINT:%[0-9]+]]:_(<4 x s16>) = G_FRINT [[COPY]]
163 ; FP16-NEXT: $d0 = COPY [[FRINT]](<4 x s16>)
164 ; FP16-NEXT: RET_ReallyLR implicit $d0
165 %0:_(<4 x s16>) = COPY $d0
166 %1:_(<4 x s16>) = G_FRINT %0
167 $d0 = COPY %1(<4 x s16>)
168 RET_ReallyLR implicit $d0
172 name: test_v8f16.rint
174 tracksRegLiveness: true
175 machineFunctionInfo: {}
180 ; NOFP16-LABEL: name: test_v8f16.rint
181 ; NOFP16: liveins: $q0
182 ; NOFP16-NEXT: {{ $}}
183 ; NOFP16-NEXT: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
184 ; NOFP16-NEXT: [[UV:%[0-9]+]]:_(<4 x s16>), [[UV1:%[0-9]+]]:_(<4 x s16>) = G_UNMERGE_VALUES [[COPY]](<8 x s16>)
185 ; NOFP16-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV]](<4 x s16>)
186 ; NOFP16-NEXT: [[FPEXT1:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV1]](<4 x s16>)
187 ; NOFP16-NEXT: [[FRINT:%[0-9]+]]:_(<4 x s32>) = G_FRINT [[FPEXT]]
188 ; NOFP16-NEXT: [[FRINT1:%[0-9]+]]:_(<4 x s32>) = G_FRINT [[FPEXT1]]
189 ; NOFP16-NEXT: [[FPTRUNC:%[0-9]+]]:_(<4 x s16>) = G_FPTRUNC [[FRINT]](<4 x s32>)
190 ; NOFP16-NEXT: [[FPTRUNC1:%[0-9]+]]:_(<4 x s16>) = G_FPTRUNC [[FRINT1]](<4 x s32>)
191 ; NOFP16-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<8 x s16>) = G_CONCAT_VECTORS [[FPTRUNC]](<4 x s16>), [[FPTRUNC1]](<4 x s16>)
192 ; NOFP16-NEXT: $q0 = COPY [[CONCAT_VECTORS]](<8 x s16>)
193 ; NOFP16-NEXT: RET_ReallyLR implicit $q0
195 ; FP16-LABEL: name: test_v8f16.rint
198 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
199 ; FP16-NEXT: [[FRINT:%[0-9]+]]:_(<8 x s16>) = G_FRINT [[COPY]]
200 ; FP16-NEXT: $q0 = COPY [[FRINT]](<8 x s16>)
201 ; FP16-NEXT: RET_ReallyLR implicit $q0
202 %0:_(<8 x s16>) = COPY $q0
203 %1:_(<8 x s16>) = G_FRINT %0
204 $q0 = COPY %1(<8 x s16>)
205 RET_ReallyLR implicit $q0
209 name: test_v2f32.rint
211 tracksRegLiveness: true
212 machineFunctionInfo: {}
217 ; NOFP16-LABEL: name: test_v2f32.rint
218 ; NOFP16: liveins: $d0
219 ; NOFP16-NEXT: {{ $}}
220 ; NOFP16-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
221 ; NOFP16-NEXT: [[FRINT:%[0-9]+]]:_(<2 x s32>) = G_FRINT [[COPY]]
222 ; NOFP16-NEXT: $d0 = COPY [[FRINT]](<2 x s32>)
223 ; NOFP16-NEXT: RET_ReallyLR implicit $d0
225 ; FP16-LABEL: name: test_v2f32.rint
228 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
229 ; FP16-NEXT: [[FRINT:%[0-9]+]]:_(<2 x s32>) = G_FRINT [[COPY]]
230 ; FP16-NEXT: $d0 = COPY [[FRINT]](<2 x s32>)
231 ; FP16-NEXT: RET_ReallyLR implicit $d0
232 %0:_(<2 x s32>) = COPY $d0
233 %1:_(<2 x s32>) = G_FRINT %0
234 $d0 = COPY %1(<2 x s32>)
235 RET_ReallyLR implicit $d0