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
30 ; NOFP16: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
31 ; NOFP16: [[FRINT:%[0-9]+]]:_(s32) = G_FRINT [[COPY]]
32 ; NOFP16: $s0 = COPY [[FRINT]](s32)
33 ; NOFP16: RET_ReallyLR implicit $s0
34 ; FP16-LABEL: name: test_f32.rint
36 ; FP16: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
37 ; FP16: [[FRINT:%[0-9]+]]:_(s32) = G_FRINT [[COPY]]
38 ; FP16: $s0 = COPY [[FRINT]](s32)
39 ; FP16: RET_ReallyLR implicit $s0
41 %1:_(s32) = G_FRINT %0
43 RET_ReallyLR implicit $s0
49 tracksRegLiveness: true
50 machineFunctionInfo: {}
55 ; NOFP16-LABEL: name: test_f64.rint
56 ; NOFP16: liveins: $d0
57 ; NOFP16: [[COPY:%[0-9]+]]:_(s64) = COPY $d0
58 ; NOFP16: [[FRINT:%[0-9]+]]:_(s64) = G_FRINT [[COPY]]
59 ; NOFP16: $d0 = COPY [[FRINT]](s64)
60 ; NOFP16: RET_ReallyLR implicit $d0
61 ; FP16-LABEL: name: test_f64.rint
63 ; FP16: [[COPY:%[0-9]+]]:_(s64) = COPY $d0
64 ; FP16: [[FRINT:%[0-9]+]]:_(s64) = G_FRINT [[COPY]]
65 ; FP16: $d0 = COPY [[FRINT]](s64)
66 ; FP16: RET_ReallyLR implicit $d0
68 %1:_(s64) = G_FRINT %0
70 RET_ReallyLR implicit $d0
76 tracksRegLiveness: true
77 machineFunctionInfo: {}
82 ; NOFP16-LABEL: name: test_v4f32.rint
83 ; NOFP16: liveins: $q0
84 ; NOFP16: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
85 ; NOFP16: [[FRINT:%[0-9]+]]:_(<4 x s32>) = G_FRINT [[COPY]]
86 ; NOFP16: $q0 = COPY [[FRINT]](<4 x s32>)
87 ; NOFP16: RET_ReallyLR implicit $q0
88 ; FP16-LABEL: name: test_v4f32.rint
90 ; FP16: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
91 ; FP16: [[FRINT:%[0-9]+]]:_(<4 x s32>) = G_FRINT [[COPY]]
92 ; FP16: $q0 = COPY [[FRINT]](<4 x s32>)
93 ; FP16: RET_ReallyLR implicit $q0
94 %0:_(<4 x s32>) = COPY $q0
95 %1:_(<4 x s32>) = G_FRINT %0
96 $q0 = COPY %1(<4 x s32>)
97 RET_ReallyLR implicit $q0
101 name: test_v2f64.rint
103 tracksRegLiveness: true
104 machineFunctionInfo: {}
109 ; NOFP16-LABEL: name: test_v2f64.rint
110 ; NOFP16: liveins: $q0
111 ; NOFP16: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
112 ; NOFP16: [[FRINT:%[0-9]+]]:_(<2 x s64>) = G_FRINT [[COPY]]
113 ; NOFP16: $q0 = COPY [[FRINT]](<2 x s64>)
114 ; NOFP16: RET_ReallyLR implicit $q0
115 ; FP16-LABEL: name: test_v2f64.rint
117 ; FP16: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
118 ; FP16: [[FRINT:%[0-9]+]]:_(<2 x s64>) = G_FRINT [[COPY]]
119 ; FP16: $q0 = COPY [[FRINT]](<2 x s64>)
120 ; FP16: RET_ReallyLR implicit $q0
121 %0:_(<2 x s64>) = COPY $q0
122 %1:_(<2 x s64>) = G_FRINT %0
123 $q0 = COPY %1(<2 x s64>)
124 RET_ReallyLR implicit $q0
128 name: test_v4f16.rint
130 tracksRegLiveness: true
131 machineFunctionInfo: {}
136 ; NOFP16-LABEL: name: test_v4f16.rint
137 ; NOFP16: liveins: $d0
138 ; NOFP16: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
139 ; NOFP16: [[UV:%[0-9]+]]:_(s16), [[UV1:%[0-9]+]]:_(s16), [[UV2:%[0-9]+]]:_(s16), [[UV3:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
140 ; NOFP16: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT [[UV]](s16)
141 ; NOFP16: [[FRINT:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT]]
142 ; NOFP16: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT]](s32)
143 ; NOFP16: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT [[UV1]](s16)
144 ; NOFP16: [[FRINT1:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT1]]
145 ; NOFP16: [[FPTRUNC1:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT1]](s32)
146 ; NOFP16: [[FPEXT2:%[0-9]+]]:_(s32) = G_FPEXT [[UV2]](s16)
147 ; NOFP16: [[FRINT2:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT2]]
148 ; NOFP16: [[FPTRUNC2:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT2]](s32)
149 ; NOFP16: [[FPEXT3:%[0-9]+]]:_(s32) = G_FPEXT [[UV3]](s16)
150 ; NOFP16: [[FRINT3:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT3]]
151 ; NOFP16: [[FPTRUNC3:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT3]](s32)
152 ; NOFP16: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s16>) = G_BUILD_VECTOR [[FPTRUNC]](s16), [[FPTRUNC1]](s16), [[FPTRUNC2]](s16), [[FPTRUNC3]](s16)
153 ; NOFP16: $d0 = COPY [[BUILD_VECTOR]](<4 x s16>)
154 ; NOFP16: RET_ReallyLR implicit $d0
155 ; FP16-LABEL: name: test_v4f16.rint
157 ; FP16: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
158 ; FP16: [[FRINT:%[0-9]+]]:_(<4 x s16>) = G_FRINT [[COPY]]
159 ; FP16: $d0 = COPY [[FRINT]](<4 x s16>)
160 ; FP16: RET_ReallyLR implicit $d0
161 %0:_(<4 x s16>) = COPY $d0
162 %1:_(<4 x s16>) = G_FRINT %0
163 $d0 = COPY %1(<4 x s16>)
164 RET_ReallyLR implicit $d0
168 name: test_v8f16.rint
170 tracksRegLiveness: true
171 machineFunctionInfo: {}
176 ; NOFP16-LABEL: name: test_v8f16.rint
177 ; NOFP16: liveins: $q0
178 ; NOFP16: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
179 ; NOFP16: [[UV:%[0-9]+]]:_(s16), [[UV1:%[0-9]+]]:_(s16), [[UV2:%[0-9]+]]:_(s16), [[UV3:%[0-9]+]]:_(s16), [[UV4:%[0-9]+]]:_(s16), [[UV5:%[0-9]+]]:_(s16), [[UV6:%[0-9]+]]:_(s16), [[UV7:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[COPY]](<8 x s16>)
180 ; NOFP16: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT [[UV]](s16)
181 ; NOFP16: [[FRINT:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT]]
182 ; NOFP16: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT]](s32)
183 ; NOFP16: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT [[UV1]](s16)
184 ; NOFP16: [[FRINT1:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT1]]
185 ; NOFP16: [[FPTRUNC1:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT1]](s32)
186 ; NOFP16: [[FPEXT2:%[0-9]+]]:_(s32) = G_FPEXT [[UV2]](s16)
187 ; NOFP16: [[FRINT2:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT2]]
188 ; NOFP16: [[FPTRUNC2:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT2]](s32)
189 ; NOFP16: [[FPEXT3:%[0-9]+]]:_(s32) = G_FPEXT [[UV3]](s16)
190 ; NOFP16: [[FRINT3:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT3]]
191 ; NOFP16: [[FPTRUNC3:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT3]](s32)
192 ; NOFP16: [[FPEXT4:%[0-9]+]]:_(s32) = G_FPEXT [[UV4]](s16)
193 ; NOFP16: [[FRINT4:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT4]]
194 ; NOFP16: [[FPTRUNC4:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT4]](s32)
195 ; NOFP16: [[FPEXT5:%[0-9]+]]:_(s32) = G_FPEXT [[UV5]](s16)
196 ; NOFP16: [[FRINT5:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT5]]
197 ; NOFP16: [[FPTRUNC5:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT5]](s32)
198 ; NOFP16: [[FPEXT6:%[0-9]+]]:_(s32) = G_FPEXT [[UV6]](s16)
199 ; NOFP16: [[FRINT6:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT6]]
200 ; NOFP16: [[FPTRUNC6:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT6]](s32)
201 ; NOFP16: [[FPEXT7:%[0-9]+]]:_(s32) = G_FPEXT [[UV7]](s16)
202 ; NOFP16: [[FRINT7:%[0-9]+]]:_(s32) = G_FRINT [[FPEXT7]]
203 ; NOFP16: [[FPTRUNC7:%[0-9]+]]:_(s16) = G_FPTRUNC [[FRINT7]](s32)
204 ; NOFP16: [[BUILD_VECTOR:%[0-9]+]]:_(<8 x s16>) = G_BUILD_VECTOR [[FPTRUNC]](s16), [[FPTRUNC1]](s16), [[FPTRUNC2]](s16), [[FPTRUNC3]](s16), [[FPTRUNC4]](s16), [[FPTRUNC5]](s16), [[FPTRUNC6]](s16), [[FPTRUNC7]](s16)
205 ; NOFP16: $q0 = COPY [[BUILD_VECTOR]](<8 x s16>)
206 ; NOFP16: RET_ReallyLR implicit $q0
207 ; FP16-LABEL: name: test_v8f16.rint
209 ; FP16: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
210 ; FP16: [[FRINT:%[0-9]+]]:_(<8 x s16>) = G_FRINT [[COPY]]
211 ; FP16: $q0 = COPY [[FRINT]](<8 x s16>)
212 ; FP16: RET_ReallyLR implicit $q0
213 %0:_(<8 x s16>) = COPY $q0
214 %1:_(<8 x s16>) = G_FRINT %0
215 $q0 = COPY %1(<8 x s16>)
216 RET_ReallyLR implicit $q0
220 name: test_v2f32.rint
222 tracksRegLiveness: true
223 machineFunctionInfo: {}
228 ; NOFP16-LABEL: name: test_v2f32.rint
229 ; NOFP16: liveins: $d0
230 ; NOFP16: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
231 ; NOFP16: [[FRINT:%[0-9]+]]:_(<2 x s32>) = G_FRINT [[COPY]]
232 ; NOFP16: $d0 = COPY [[FRINT]](<2 x s32>)
233 ; NOFP16: RET_ReallyLR implicit $d0
234 ; FP16-LABEL: name: test_v2f32.rint
236 ; FP16: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
237 ; FP16: [[FRINT:%[0-9]+]]:_(<2 x s32>) = G_FRINT [[COPY]]
238 ; FP16: $d0 = COPY [[FRINT]](<2 x s32>)
239 ; FP16: RET_ReallyLR implicit $d0
240 %0:_(<2 x s32>) = COPY $d0
241 %1:_(<2 x s32>) = G_FRINT %0
242 $d0 = COPY %1(<2 x s32>)
243 RET_ReallyLR implicit $d0