1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -mattr=+d -run-pass=legalizer %s -o - \
11 ; CHECK-LABEL: name: fptosi_s1_s32
12 ; CHECK: liveins: $f10_f
14 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
15 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
16 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
17 ; CHECK-NEXT: PseudoRET implicit $x10
18 %0:_(s32) = COPY $f10_f
19 %1:_(s1) = G_FPTOSI %0(s32)
20 %2:_(s32) = G_ANYEXT %1(s1)
22 PseudoRET implicit $x10
31 ; CHECK-LABEL: name: fptoui_s1_s32
32 ; CHECK: liveins: $f10_f
34 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
35 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
36 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
37 ; CHECK-NEXT: PseudoRET implicit $x10
38 %0:_(s32) = COPY $f10_f
39 %1:_(s1) = G_FPTOUI %0(s32)
40 %2:_(s32) = G_ANYEXT %1(s1)
42 PseudoRET implicit $x10
51 ; CHECK-LABEL: name: fptosi_s8_s32
52 ; CHECK: liveins: $f10_f
54 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
55 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
56 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
57 ; CHECK-NEXT: PseudoRET implicit $x10
58 %0:_(s32) = COPY $f10_f
59 %1:_(s8) = G_FPTOSI %0(s32)
60 %2:_(s32) = G_ANYEXT %1(s8)
62 PseudoRET implicit $x10
71 ; CHECK-LABEL: name: fptoui_s8_s32
72 ; CHECK: liveins: $f10_f
74 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
75 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
76 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
77 ; CHECK-NEXT: PseudoRET implicit $x10
78 %0:_(s32) = COPY $f10_f
79 %1:_(s8) = G_FPTOUI %0(s32)
80 %2:_(s32) = G_ANYEXT %1(s8)
82 PseudoRET implicit $x10
91 ; CHECK-LABEL: name: fptosi_s16_s32
92 ; CHECK: liveins: $f10_f
94 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
95 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
96 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
97 ; CHECK-NEXT: PseudoRET implicit $x10
98 %0:_(s32) = COPY $f10_f
99 %1:_(s16) = G_FPTOSI %0(s32)
100 %2:_(s32) = G_ANYEXT %1(s16)
102 PseudoRET implicit $x10
111 ; CHECK-LABEL: name: fptoui_s16_s32
112 ; CHECK: liveins: $f10_f
114 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
115 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
116 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
117 ; CHECK-NEXT: PseudoRET implicit $x10
118 %0:_(s32) = COPY $f10_f
119 %1:_(s16) = G_FPTOUI %0(s32)
120 %2:_(s32) = G_ANYEXT %1(s16)
122 PseudoRET implicit $x10
131 ; CHECK-LABEL: name: fptosi_s32_s32
132 ; CHECK: liveins: $f10_f
134 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
135 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
136 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
137 ; CHECK-NEXT: PseudoRET implicit $x10
138 %0:_(s32) = COPY $f10_f
139 %1:_(s32) = G_FPTOSI %0(s32)
141 PseudoRET implicit $x10
150 ; CHECK-LABEL: name: fptoui_s32_s32
151 ; CHECK: liveins: $f10_f
153 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
154 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
155 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
156 ; CHECK-NEXT: PseudoRET implicit $x10
157 %0:_(s32) = COPY $f10_f
158 %1:_(s32) = G_FPTOUI %0(s32)
160 PseudoRET implicit $x10
169 ; CHECK-LABEL: name: fptosi_s1_s64
170 ; CHECK: liveins: $f10_d
172 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
173 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
174 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
175 ; CHECK-NEXT: PseudoRET implicit $x10
176 %0:_(s64) = COPY $f10_d
177 %1:_(s1) = G_FPTOSI %0(s64)
178 %2:_(s32) = G_ANYEXT %1(s1)
180 PseudoRET implicit $x10
189 ; CHECK-LABEL: name: fptoui_s1_s64
190 ; CHECK: liveins: $f10_d
192 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
193 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
194 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
195 ; CHECK-NEXT: PseudoRET implicit $x10
196 %0:_(s64) = COPY $f10_d
197 %1:_(s1) = G_FPTOUI %0(s64)
198 %2:_(s32) = G_ANYEXT %1(s1)
200 PseudoRET implicit $x10
209 ; CHECK-LABEL: name: fptosi_s8_s64
210 ; CHECK: liveins: $f10_d
212 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
213 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
214 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
215 ; CHECK-NEXT: PseudoRET implicit $x10
216 %0:_(s64) = COPY $f10_d
217 %1:_(s8) = G_FPTOSI %0(s64)
218 %2:_(s32) = G_ANYEXT %1(s8)
220 PseudoRET implicit $x10
229 ; CHECK-LABEL: name: fptoui_s8_s64
230 ; CHECK: liveins: $f10_d
232 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
233 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
234 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
235 ; CHECK-NEXT: PseudoRET implicit $x10
236 %0:_(s64) = COPY $f10_d
237 %1:_(s8) = G_FPTOUI %0(s64)
238 %2:_(s32) = G_ANYEXT %1(s8)
240 PseudoRET implicit $x10
249 ; CHECK-LABEL: name: fptosi_s16_s64
250 ; CHECK: liveins: $f10_d
252 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
253 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
254 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
255 ; CHECK-NEXT: PseudoRET implicit $x10
256 %0:_(s64) = COPY $f10_d
257 %1:_(s16) = G_FPTOSI %0(s64)
258 %2:_(s32) = G_ANYEXT %1(s16)
260 PseudoRET implicit $x10
269 ; CHECK-LABEL: name: fptoui_s16_s64
270 ; CHECK: liveins: $f10_d
272 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
273 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
274 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
275 ; CHECK-NEXT: PseudoRET implicit $x10
276 %0:_(s64) = COPY $f10_d
277 %1:_(s16) = G_FPTOUI %0(s64)
278 %2:_(s32) = G_ANYEXT %1(s16)
280 PseudoRET implicit $x10
289 ; CHECK-LABEL: name: fptosi_s32_s64
290 ; CHECK: liveins: $f10_d
292 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
293 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
294 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
295 ; CHECK-NEXT: PseudoRET implicit $x10
296 %0:_(s64) = COPY $f10_d
297 %1:_(s32) = G_FPTOSI %0(s64)
299 PseudoRET implicit $x10
308 ; CHECK-LABEL: name: fptoui_s32_s64
309 ; CHECK: liveins: $f10_d
311 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
312 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
313 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
314 ; CHECK-NEXT: PseudoRET implicit $x10
315 %0:_(s64) = COPY $f10_d
316 %1:_(s32) = G_FPTOUI %0(s64)
318 PseudoRET implicit $x10