1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP32
3 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP64
6 define void @i64tof32() {entry: ret void}
7 define void @i32tof32() {entry: ret void}
8 define void @i16tof32() {entry: ret void}
9 define void @i8tof32() {entry: ret void}
10 define void @i64tof64() {entry: ret void}
11 define void @i32tof64() {entry: ret void}
12 define void @i16tof64() {entry: ret void}
13 define void @i8tof64() {entry: ret void}
14 define void @u64tof32() {entry: ret void}
15 define void @u32tof32() {entry: ret void}
16 define void @u16tof32() {entry: ret void}
17 define void @u8tof32() {entry: ret void}
18 define void @u64tof64() {entry: ret void}
19 define void @u32tof64() {entry: ret void}
20 define void @u16tof64() {entry: ret void}
21 define void @u8tof64() {entry: ret void}
27 tracksRegLiveness: true
32 ; FP32-LABEL: name: i64tof32
33 ; FP32: liveins: $a0, $a1
34 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
35 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
36 ; FP32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
37 ; FP32: $a0 = COPY [[COPY]](s32)
38 ; FP32: $a1 = COPY [[COPY1]](s32)
39 ; FP32: JAL &__floatdisf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $f0
40 ; FP32: [[COPY2:%[0-9]+]]:_(s32) = COPY $f0
41 ; FP32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
42 ; FP32: $f0 = COPY [[COPY2]](s32)
43 ; FP32: RetRA implicit $f0
44 ; FP64-LABEL: name: i64tof32
45 ; FP64: liveins: $a0, $a1
46 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
47 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
48 ; FP64: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
49 ; FP64: $a0 = COPY [[COPY]](s32)
50 ; FP64: $a1 = COPY [[COPY1]](s32)
51 ; FP64: JAL &__floatdisf, csr_o32_fp64, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $f0
52 ; FP64: [[COPY2:%[0-9]+]]:_(s32) = COPY $f0
53 ; FP64: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
54 ; FP64: $f0 = COPY [[COPY2]](s32)
55 ; FP64: RetRA implicit $f0
58 %0:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
59 %3:_(s32) = G_SITOFP %0(s64)
67 tracksRegLiveness: true
72 ; FP32-LABEL: name: i32tof32
74 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
75 ; FP32: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[COPY]](s32)
76 ; FP32: $f0 = COPY [[SITOFP]](s32)
77 ; FP32: RetRA implicit $f0
78 ; FP64-LABEL: name: i32tof32
80 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
81 ; FP64: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[COPY]](s32)
82 ; FP64: $f0 = COPY [[SITOFP]](s32)
83 ; FP64: RetRA implicit $f0
85 %1:_(s32) = G_SITOFP %0(s32)
93 tracksRegLiveness: true
98 ; FP32-LABEL: name: i16tof32
100 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
101 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
102 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
103 ; FP32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
104 ; FP32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
105 ; FP32: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)
106 ; FP32: $f0 = COPY [[SITOFP]](s32)
107 ; FP32: RetRA implicit $f0
108 ; FP64-LABEL: name: i16tof32
110 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
111 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
112 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
113 ; FP64: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
114 ; FP64: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
115 ; FP64: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)
116 ; FP64: $f0 = COPY [[SITOFP]](s32)
117 ; FP64: RetRA implicit $f0
119 %0:_(s16) = G_TRUNC %1(s32)
120 %2:_(s32) = G_SITOFP %0(s16)
128 tracksRegLiveness: true
133 ; FP32-LABEL: name: i8tof32
135 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
136 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
137 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
138 ; FP32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
139 ; FP32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
140 ; FP32: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)
141 ; FP32: $f0 = COPY [[SITOFP]](s32)
142 ; FP32: RetRA implicit $f0
143 ; FP64-LABEL: name: i8tof32
145 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
146 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
147 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
148 ; FP64: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
149 ; FP64: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
150 ; FP64: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)
151 ; FP64: $f0 = COPY [[SITOFP]](s32)
152 ; FP64: RetRA implicit $f0
154 %0:_(s8) = G_TRUNC %1(s32)
155 %2:_(s32) = G_SITOFP %0(s8)
163 tracksRegLiveness: true
168 ; FP32-LABEL: name: i64tof64
169 ; FP32: liveins: $a0, $a1
170 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
171 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
172 ; FP32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
173 ; FP32: $a0 = COPY [[COPY]](s32)
174 ; FP32: $a1 = COPY [[COPY1]](s32)
175 ; FP32: JAL &__floatdidf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0
176 ; FP32: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0
177 ; FP32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
178 ; FP32: $d0 = COPY [[COPY2]](s64)
179 ; FP32: RetRA implicit $d0
180 ; FP64-LABEL: name: i64tof64
181 ; FP64: liveins: $a0, $a1
182 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
183 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
184 ; FP64: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
185 ; FP64: $a0 = COPY [[COPY]](s32)
186 ; FP64: $a1 = COPY [[COPY1]](s32)
187 ; FP64: JAL &__floatdidf, csr_o32_fp64, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0_64
188 ; FP64: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0_64
189 ; FP64: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
190 ; FP64: $d0 = COPY [[COPY2]](s64)
191 ; FP64: RetRA implicit $d0
194 %0:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
195 %3:_(s64) = G_SITOFP %0(s64)
203 tracksRegLiveness: true
208 ; FP32-LABEL: name: i32tof64
210 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
211 ; FP32: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[COPY]](s32)
212 ; FP32: $d0 = COPY [[SITOFP]](s64)
213 ; FP32: RetRA implicit $d0
214 ; FP64-LABEL: name: i32tof64
216 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
217 ; FP64: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[COPY]](s32)
218 ; FP64: $d0 = COPY [[SITOFP]](s64)
219 ; FP64: RetRA implicit $d0
221 %1:_(s64) = G_SITOFP %0(s32)
229 tracksRegLiveness: true
234 ; FP32-LABEL: name: i16tof64
236 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
237 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
238 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
239 ; FP32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
240 ; FP32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
241 ; FP32: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)
242 ; FP32: $d0 = COPY [[SITOFP]](s64)
243 ; FP32: RetRA implicit $d0
244 ; FP64-LABEL: name: i16tof64
246 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
247 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
248 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
249 ; FP64: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
250 ; FP64: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
251 ; FP64: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)
252 ; FP64: $d0 = COPY [[SITOFP]](s64)
253 ; FP64: RetRA implicit $d0
255 %0:_(s16) = G_TRUNC %1(s32)
256 %2:_(s64) = G_SITOFP %0(s16)
264 tracksRegLiveness: true
269 ; FP32-LABEL: name: i8tof64
271 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
272 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
273 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
274 ; FP32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
275 ; FP32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
276 ; FP32: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)
277 ; FP32: $d0 = COPY [[SITOFP]](s64)
278 ; FP32: RetRA implicit $d0
279 ; FP64-LABEL: name: i8tof64
281 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
282 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
283 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
284 ; FP64: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
285 ; FP64: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
286 ; FP64: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)
287 ; FP64: $d0 = COPY [[SITOFP]](s64)
288 ; FP64: RetRA implicit $d0
290 %0:_(s8) = G_TRUNC %1(s32)
291 %2:_(s64) = G_SITOFP %0(s8)
299 tracksRegLiveness: true
304 ; FP32-LABEL: name: u64tof32
305 ; FP32: liveins: $a0, $a1
306 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
307 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
308 ; FP32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
309 ; FP32: $a0 = COPY [[COPY]](s32)
310 ; FP32: $a1 = COPY [[COPY1]](s32)
311 ; FP32: JAL &__floatundisf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $f0
312 ; FP32: [[COPY2:%[0-9]+]]:_(s32) = COPY $f0
313 ; FP32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
314 ; FP32: $f0 = COPY [[COPY2]](s32)
315 ; FP32: RetRA implicit $f0
316 ; FP64-LABEL: name: u64tof32
317 ; FP64: liveins: $a0, $a1
318 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
319 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
320 ; FP64: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
321 ; FP64: $a0 = COPY [[COPY]](s32)
322 ; FP64: $a1 = COPY [[COPY1]](s32)
323 ; FP64: JAL &__floatundisf, csr_o32_fp64, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $f0
324 ; FP64: [[COPY2:%[0-9]+]]:_(s32) = COPY $f0
325 ; FP64: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
326 ; FP64: $f0 = COPY [[COPY2]](s32)
327 ; FP64: RetRA implicit $f0
330 %0:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
331 %3:_(s32) = G_UITOFP %0(s64)
339 tracksRegLiveness: true
344 ; FP32-LABEL: name: u32tof32
346 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
347 ; FP32: [[C:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
348 ; FP32: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]](s32)
349 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[COPY1]], [[C]](s32)
350 ; FP32: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
351 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C1]]
352 ; FP32: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
353 ; FP32: $f0 = COPY [[FPTRUNC]](s32)
354 ; FP32: RetRA implicit $f0
355 ; FP64-LABEL: name: u32tof32
357 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
358 ; FP64: [[C:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
359 ; FP64: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]](s32)
360 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[COPY1]], [[C]](s32)
361 ; FP64: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
362 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C1]]
363 ; FP64: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
364 ; FP64: $f0 = COPY [[FPTRUNC]](s32)
365 ; FP64: RetRA implicit $f0
367 %1:_(s32) = G_UITOFP %0(s32)
375 tracksRegLiveness: true
380 ; FP32-LABEL: name: u16tof32
382 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
383 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
384 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
385 ; FP32: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
386 ; FP32: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
387 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[AND]](s32), [[C1]](s32)
388 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
389 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C2]]
390 ; FP32: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
391 ; FP32: $f0 = COPY [[FPTRUNC]](s32)
392 ; FP32: RetRA implicit $f0
393 ; FP64-LABEL: name: u16tof32
395 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
396 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
397 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
398 ; FP64: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
399 ; FP64: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
400 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[AND]](s32), [[C1]](s32)
401 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
402 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C2]]
403 ; FP64: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
404 ; FP64: $f0 = COPY [[FPTRUNC]](s32)
405 ; FP64: RetRA implicit $f0
407 %0:_(s16) = G_TRUNC %1(s32)
408 %2:_(s32) = G_UITOFP %0(s16)
416 tracksRegLiveness: true
421 ; FP32-LABEL: name: u8tof32
423 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
424 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
425 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
426 ; FP32: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
427 ; FP32: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
428 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[AND]](s32), [[C1]](s32)
429 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
430 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C2]]
431 ; FP32: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
432 ; FP32: $f0 = COPY [[FPTRUNC]](s32)
433 ; FP32: RetRA implicit $f0
434 ; FP64-LABEL: name: u8tof32
436 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
437 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
438 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
439 ; FP64: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
440 ; FP64: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
441 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[AND]](s32), [[C1]](s32)
442 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
443 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C2]]
444 ; FP64: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
445 ; FP64: $f0 = COPY [[FPTRUNC]](s32)
446 ; FP64: RetRA implicit $f0
448 %0:_(s8) = G_TRUNC %1(s32)
449 %2:_(s32) = G_UITOFP %0(s8)
457 tracksRegLiveness: true
462 ; FP32-LABEL: name: u64tof64
463 ; FP32: liveins: $a0, $a1
464 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
465 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
466 ; FP32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
467 ; FP32: $a0 = COPY [[COPY]](s32)
468 ; FP32: $a1 = COPY [[COPY1]](s32)
469 ; FP32: JAL &__floatundidf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0
470 ; FP32: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0
471 ; FP32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
472 ; FP32: $d0 = COPY [[COPY2]](s64)
473 ; FP32: RetRA implicit $d0
474 ; FP64-LABEL: name: u64tof64
475 ; FP64: liveins: $a0, $a1
476 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
477 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
478 ; FP64: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
479 ; FP64: $a0 = COPY [[COPY]](s32)
480 ; FP64: $a1 = COPY [[COPY1]](s32)
481 ; FP64: JAL &__floatundidf, csr_o32_fp64, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0_64
482 ; FP64: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0_64
483 ; FP64: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
484 ; FP64: $d0 = COPY [[COPY2]](s64)
485 ; FP64: RetRA implicit $d0
488 %0:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
489 %3:_(s64) = G_UITOFP %0(s64)
497 tracksRegLiveness: true
502 ; FP32-LABEL: name: u32tof64
504 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
505 ; FP32: [[C:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
506 ; FP32: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]](s32)
507 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[COPY1]], [[C]](s32)
508 ; FP32: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
509 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C1]]
510 ; FP32: $d0 = COPY [[FSUB]](s64)
511 ; FP32: RetRA implicit $d0
512 ; FP64-LABEL: name: u32tof64
514 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
515 ; FP64: [[C:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
516 ; FP64: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]](s32)
517 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[COPY1]], [[C]](s32)
518 ; FP64: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
519 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C1]]
520 ; FP64: $d0 = COPY [[FSUB]](s64)
521 ; FP64: RetRA implicit $d0
523 %1:_(s64) = G_UITOFP %0(s32)
531 tracksRegLiveness: true
536 ; FP32-LABEL: name: u16tof64
538 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
539 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
540 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
541 ; FP32: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
542 ; FP32: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
543 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[AND]](s32), [[C1]](s32)
544 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
545 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C2]]
546 ; FP32: $d0 = COPY [[FSUB]](s64)
547 ; FP32: RetRA implicit $d0
548 ; FP64-LABEL: name: u16tof64
550 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
551 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
552 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
553 ; FP64: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
554 ; FP64: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
555 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[AND]](s32), [[C1]](s32)
556 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
557 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C2]]
558 ; FP64: $d0 = COPY [[FSUB]](s64)
559 ; FP64: RetRA implicit $d0
561 %0:_(s16) = G_TRUNC %1(s32)
562 %2:_(s64) = G_UITOFP %0(s16)
570 tracksRegLiveness: true
575 ; FP32-LABEL: name: u8tof64
577 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
578 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
579 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
580 ; FP32: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
581 ; FP32: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
582 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[AND]](s32), [[C1]](s32)
583 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
584 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C2]]
585 ; FP32: $d0 = COPY [[FSUB]](s64)
586 ; FP32: RetRA implicit $d0
587 ; FP64-LABEL: name: u8tof64
589 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
590 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
591 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
592 ; FP64: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
593 ; FP64: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
594 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[AND]](s32), [[C1]](s32)
595 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
596 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C2]]
597 ; FP64: $d0 = COPY [[FSUB]](s64)
598 ; FP64: RetRA implicit $d0
600 %0:_(s8) = G_TRUNC %1(s32)
601 %2:_(s64) = G_UITOFP %0(s8)