1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -mattr=+zfh -run-pass=instruction-select \
3 # RUN: -simplify-mir -verify-machineinstrs %s -o - | FileCheck %s
9 tracksRegLiveness: true
12 liveins: $f10_h, $f11_h
14 ; CHECK-LABEL: name: fcmp_oeq_f16
15 ; CHECK: liveins: $f10_h, $f11_h
17 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
18 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
19 ; CHECK-NEXT: [[FEQ_H:%[0-9]+]]:gpr = nofpexcept FEQ_H [[COPY]], [[COPY1]]
20 ; CHECK-NEXT: $x10 = COPY [[FEQ_H]]
21 ; CHECK-NEXT: PseudoRET implicit $x10
22 %0:fprb(s16) = COPY $f10_h
23 %1:fprb(s16) = COPY $f11_h
24 %4:gprb(s32) = G_FCMP floatpred(oeq), %0(s16), %1
26 PseudoRET implicit $x10
33 tracksRegLiveness: true
36 liveins: $f10_h, $f11_h
38 ; CHECK-LABEL: name: fcmp_ogt_f16
39 ; CHECK: liveins: $f10_h, $f11_h
41 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
42 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
43 ; CHECK-NEXT: [[FLT_H:%[0-9]+]]:gpr = FLT_H [[COPY1]], [[COPY]]
44 ; CHECK-NEXT: $x10 = COPY [[FLT_H]]
45 ; CHECK-NEXT: PseudoRET implicit $x10
46 %0:fprb(s16) = COPY $f10_h
47 %1:fprb(s16) = COPY $f11_h
48 %4:gprb(s32) = G_FCMP floatpred(ogt), %0(s16), %1
50 PseudoRET implicit $x10
57 tracksRegLiveness: true
60 liveins: $f10_h, $f11_h
62 ; CHECK-LABEL: name: fcmp_oge_f16
63 ; CHECK: liveins: $f10_h, $f11_h
65 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
66 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
67 ; CHECK-NEXT: [[FLE_H:%[0-9]+]]:gpr = FLE_H [[COPY1]], [[COPY]]
68 ; CHECK-NEXT: $x10 = COPY [[FLE_H]]
69 ; CHECK-NEXT: PseudoRET implicit $x10
70 %0:fprb(s16) = COPY $f10_h
71 %1:fprb(s16) = COPY $f11_h
72 %4:gprb(s32) = G_FCMP floatpred(oge), %0(s16), %1
74 PseudoRET implicit $x10
81 tracksRegLiveness: true
84 liveins: $f10_h, $f11_h
86 ; CHECK-LABEL: name: fcmp_olt_f16
87 ; CHECK: liveins: $f10_h, $f11_h
89 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
90 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
91 ; CHECK-NEXT: [[FLT_H:%[0-9]+]]:gpr = nofpexcept FLT_H [[COPY]], [[COPY1]]
92 ; CHECK-NEXT: $x10 = COPY [[FLT_H]]
93 ; CHECK-NEXT: PseudoRET implicit $x10
94 %0:fprb(s16) = COPY $f10_h
95 %1:fprb(s16) = COPY $f11_h
96 %4:gprb(s32) = G_FCMP floatpred(olt), %0(s16), %1
98 PseudoRET implicit $x10
104 regBankSelected: true
105 tracksRegLiveness: true
108 liveins: $f10_h, $f11_h
110 ; CHECK-LABEL: name: fcmp_ole_f16
111 ; CHECK: liveins: $f10_h, $f11_h
113 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
114 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
115 ; CHECK-NEXT: [[FLE_H:%[0-9]+]]:gpr = nofpexcept FLE_H [[COPY]], [[COPY1]]
116 ; CHECK-NEXT: $x10 = COPY [[FLE_H]]
117 ; CHECK-NEXT: PseudoRET implicit $x10
118 %0:fprb(s16) = COPY $f10_h
119 %1:fprb(s16) = COPY $f11_h
120 %4:gprb(s32) = G_FCMP floatpred(ole), %0(s16), %1
122 PseudoRET implicit $x10
128 regBankSelected: true
129 tracksRegLiveness: true
132 liveins: $f10_h, $f11_h
134 ; CHECK-LABEL: name: fcmp_one_f16
135 ; CHECK: liveins: $f10_h, $f11_h
137 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
138 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
139 ; CHECK-NEXT: [[FLT_H:%[0-9]+]]:gpr = FLT_H [[COPY]], [[COPY1]]
140 ; CHECK-NEXT: [[FLT_H1:%[0-9]+]]:gpr = FLT_H [[COPY1]], [[COPY]]
141 ; CHECK-NEXT: [[OR:%[0-9]+]]:gpr = OR [[FLT_H]], [[FLT_H1]]
142 ; CHECK-NEXT: $x10 = COPY [[OR]]
143 ; CHECK-NEXT: PseudoRET implicit $x10
144 %0:fprb(s16) = COPY $f10_h
145 %1:fprb(s16) = COPY $f11_h
146 %4:gprb(s32) = G_FCMP floatpred(one), %0(s16), %1
148 PseudoRET implicit $x10
154 regBankSelected: true
155 tracksRegLiveness: true
158 liveins: $f10_h, $f11_h
160 ; CHECK-LABEL: name: fcmp_ord_f16
161 ; CHECK: liveins: $f10_h, $f11_h
163 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
164 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
165 ; CHECK-NEXT: [[FEQ_H:%[0-9]+]]:gpr = FEQ_H [[COPY]], [[COPY]]
166 ; CHECK-NEXT: [[FEQ_H1:%[0-9]+]]:gpr = FEQ_H [[COPY1]], [[COPY1]]
167 ; CHECK-NEXT: [[AND:%[0-9]+]]:gpr = AND [[FEQ_H]], [[FEQ_H1]]
168 ; CHECK-NEXT: $x10 = COPY [[AND]]
169 ; CHECK-NEXT: PseudoRET implicit $x10
170 %0:fprb(s16) = COPY $f10_h
171 %1:fprb(s16) = COPY $f11_h
172 %4:gprb(s32) = G_FCMP floatpred(ord), %0(s16), %1
174 PseudoRET implicit $x10
180 regBankSelected: true
181 tracksRegLiveness: true
184 liveins: $f10_h, $f11_h
186 ; CHECK-LABEL: name: fcmp_ueq_f16
187 ; CHECK: liveins: $f10_h, $f11_h
189 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
190 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
191 ; CHECK-NEXT: [[FLT_H:%[0-9]+]]:gpr = FLT_H [[COPY]], [[COPY1]]
192 ; CHECK-NEXT: [[FLT_H1:%[0-9]+]]:gpr = FLT_H [[COPY1]], [[COPY]]
193 ; CHECK-NEXT: [[OR:%[0-9]+]]:gpr = OR [[FLT_H]], [[FLT_H1]]
194 ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[OR]], 1
195 ; CHECK-NEXT: $x10 = COPY [[XORI]]
196 ; CHECK-NEXT: PseudoRET implicit $x10
197 %0:fprb(s16) = COPY $f10_h
198 %1:fprb(s16) = COPY $f11_h
199 %4:gprb(s32) = G_FCMP floatpred(ueq), %0(s16), %1
201 PseudoRET implicit $x10
207 regBankSelected: true
208 tracksRegLiveness: true
211 liveins: $f10_h, $f11_h
213 ; CHECK-LABEL: name: fcmp_ugt_f16
214 ; CHECK: liveins: $f10_h, $f11_h
216 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
217 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
218 ; CHECK-NEXT: [[FLE_H:%[0-9]+]]:gpr = FLE_H [[COPY]], [[COPY1]]
219 ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[FLE_H]], 1
220 ; CHECK-NEXT: $x10 = COPY [[XORI]]
221 ; CHECK-NEXT: PseudoRET implicit $x10
222 %0:fprb(s16) = COPY $f10_h
223 %1:fprb(s16) = COPY $f11_h
224 %4:gprb(s32) = G_FCMP floatpred(ugt), %0(s16), %1
226 PseudoRET implicit $x10
232 regBankSelected: true
233 tracksRegLiveness: true
236 liveins: $f10_h, $f11_h
238 ; CHECK-LABEL: name: fcmp_uge_f16
239 ; CHECK: liveins: $f10_h, $f11_h
241 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
242 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
243 ; CHECK-NEXT: [[FLT_H:%[0-9]+]]:gpr = FLT_H [[COPY]], [[COPY1]]
244 ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[FLT_H]], 1
245 ; CHECK-NEXT: $x10 = COPY [[XORI]]
246 ; CHECK-NEXT: PseudoRET implicit $x10
247 %0:fprb(s16) = COPY $f10_h
248 %1:fprb(s16) = COPY $f11_h
249 %4:gprb(s32) = G_FCMP floatpred(uge), %0(s16), %1
251 PseudoRET implicit $x10
257 regBankSelected: true
258 tracksRegLiveness: true
261 liveins: $f10_h, $f11_h
263 ; CHECK-LABEL: name: fcmp_ult_f16
264 ; CHECK: liveins: $f10_h, $f11_h
266 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
267 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
268 ; CHECK-NEXT: [[FLE_H:%[0-9]+]]:gpr = FLE_H [[COPY1]], [[COPY]]
269 ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[FLE_H]], 1
270 ; CHECK-NEXT: $x10 = COPY [[XORI]]
271 ; CHECK-NEXT: PseudoRET implicit $x10
272 %0:fprb(s16) = COPY $f10_h
273 %1:fprb(s16) = COPY $f11_h
274 %4:gprb(s32) = G_FCMP floatpred(ult), %0(s16), %1
276 PseudoRET implicit $x10
282 regBankSelected: true
283 tracksRegLiveness: true
286 liveins: $f10_h, $f11_h
288 ; CHECK-LABEL: name: fcmp_ule_f16
289 ; CHECK: liveins: $f10_h, $f11_h
291 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
292 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
293 ; CHECK-NEXT: [[FLT_H:%[0-9]+]]:gpr = FLT_H [[COPY1]], [[COPY]]
294 ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[FLT_H]], 1
295 ; CHECK-NEXT: $x10 = COPY [[XORI]]
296 ; CHECK-NEXT: PseudoRET implicit $x10
297 %0:fprb(s16) = COPY $f10_h
298 %1:fprb(s16) = COPY $f11_h
299 %4:gprb(s32) = G_FCMP floatpred(ule), %0(s16), %1
301 PseudoRET implicit $x10
307 regBankSelected: true
308 tracksRegLiveness: true
311 liveins: $f10_h, $f11_h
313 ; CHECK-LABEL: name: fcmp_une_f16
314 ; CHECK: liveins: $f10_h, $f11_h
316 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
317 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
318 ; CHECK-NEXT: [[FEQ_H:%[0-9]+]]:gpr = FEQ_H [[COPY]], [[COPY1]]
319 ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[FEQ_H]], 1
320 ; CHECK-NEXT: $x10 = COPY [[XORI]]
321 ; CHECK-NEXT: PseudoRET implicit $x10
322 %0:fprb(s16) = COPY $f10_h
323 %1:fprb(s16) = COPY $f11_h
324 %4:gprb(s32) = G_FCMP floatpred(une), %0(s16), %1
326 PseudoRET implicit $x10
332 regBankSelected: true
333 tracksRegLiveness: true
336 liveins: $f10_h, $f11_h
338 ; CHECK-LABEL: name: fcmp_uno_f16
339 ; CHECK: liveins: $f10_h, $f11_h
341 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
342 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY $f11_h
343 ; CHECK-NEXT: [[FEQ_H:%[0-9]+]]:gpr = FEQ_H [[COPY]], [[COPY]]
344 ; CHECK-NEXT: [[FEQ_H1:%[0-9]+]]:gpr = FEQ_H [[COPY1]], [[COPY1]]
345 ; CHECK-NEXT: [[AND:%[0-9]+]]:gpr = AND [[FEQ_H]], [[FEQ_H1]]
346 ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[AND]], 1
347 ; CHECK-NEXT: $x10 = COPY [[XORI]]
348 ; CHECK-NEXT: PseudoRET implicit $x10
349 %0:fprb(s16) = COPY $f10_h
350 %1:fprb(s16) = COPY $f11_h
351 %4:gprb(s32) = G_FCMP floatpred(uno), %0(s16), %1
353 PseudoRET implicit $x10