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: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
102 ; FP32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
103 ; FP32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
104 ; FP32: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)
105 ; FP32: $f0 = COPY [[SITOFP]](s32)
106 ; FP32: RetRA implicit $f0
107 ; FP64-LABEL: name: i16tof32
109 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
110 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
111 ; FP64: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
112 ; FP64: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
113 ; FP64: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)
114 ; FP64: $f0 = COPY [[SITOFP]](s32)
115 ; FP64: RetRA implicit $f0
117 %0:_(s16) = G_TRUNC %1(s32)
118 %2:_(s32) = G_SITOFP %0(s16)
126 tracksRegLiveness: true
131 ; FP32-LABEL: name: i8tof32
133 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
134 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
135 ; FP32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
136 ; FP32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
137 ; FP32: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)
138 ; FP32: $f0 = COPY [[SITOFP]](s32)
139 ; FP32: RetRA implicit $f0
140 ; FP64-LABEL: name: i8tof32
142 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
143 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
144 ; FP64: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
145 ; FP64: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
146 ; FP64: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)
147 ; FP64: $f0 = COPY [[SITOFP]](s32)
148 ; FP64: RetRA implicit $f0
150 %0:_(s8) = G_TRUNC %1(s32)
151 %2:_(s32) = G_SITOFP %0(s8)
159 tracksRegLiveness: true
164 ; FP32-LABEL: name: i64tof64
165 ; FP32: liveins: $a0, $a1
166 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
167 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
168 ; FP32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
169 ; FP32: $a0 = COPY [[COPY]](s32)
170 ; FP32: $a1 = COPY [[COPY1]](s32)
171 ; FP32: JAL &__floatdidf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0
172 ; FP32: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0
173 ; FP32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
174 ; FP32: $d0 = COPY [[COPY2]](s64)
175 ; FP32: RetRA implicit $d0
176 ; FP64-LABEL: name: i64tof64
177 ; FP64: liveins: $a0, $a1
178 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
179 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
180 ; FP64: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
181 ; FP64: $a0 = COPY [[COPY]](s32)
182 ; FP64: $a1 = COPY [[COPY1]](s32)
183 ; FP64: JAL &__floatdidf, csr_o32_fp64, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0_64
184 ; FP64: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0_64
185 ; FP64: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
186 ; FP64: $d0 = COPY [[COPY2]](s64)
187 ; FP64: RetRA implicit $d0
190 %0:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
191 %3:_(s64) = G_SITOFP %0(s64)
199 tracksRegLiveness: true
204 ; FP32-LABEL: name: i32tof64
206 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
207 ; FP32: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[COPY]](s32)
208 ; FP32: $d0 = COPY [[SITOFP]](s64)
209 ; FP32: RetRA implicit $d0
210 ; FP64-LABEL: name: i32tof64
212 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
213 ; FP64: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[COPY]](s32)
214 ; FP64: $d0 = COPY [[SITOFP]](s64)
215 ; FP64: RetRA implicit $d0
217 %1:_(s64) = G_SITOFP %0(s32)
225 tracksRegLiveness: true
230 ; FP32-LABEL: name: i16tof64
232 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
233 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
234 ; FP32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
235 ; FP32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
236 ; FP32: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)
237 ; FP32: $d0 = COPY [[SITOFP]](s64)
238 ; FP32: RetRA implicit $d0
239 ; FP64-LABEL: name: i16tof64
241 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
242 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
243 ; FP64: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
244 ; FP64: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
245 ; FP64: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)
246 ; FP64: $d0 = COPY [[SITOFP]](s64)
247 ; FP64: RetRA implicit $d0
249 %0:_(s16) = G_TRUNC %1(s32)
250 %2:_(s64) = G_SITOFP %0(s16)
258 tracksRegLiveness: true
263 ; FP32-LABEL: name: i8tof64
265 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
266 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
267 ; FP32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
268 ; FP32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
269 ; FP32: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)
270 ; FP32: $d0 = COPY [[SITOFP]](s64)
271 ; FP32: RetRA implicit $d0
272 ; FP64-LABEL: name: i8tof64
274 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
275 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
276 ; FP64: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
277 ; FP64: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
278 ; FP64: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)
279 ; FP64: $d0 = COPY [[SITOFP]](s64)
280 ; FP64: RetRA implicit $d0
282 %0:_(s8) = G_TRUNC %1(s32)
283 %2:_(s64) = G_SITOFP %0(s8)
291 tracksRegLiveness: true
296 ; FP32-LABEL: name: u64tof32
297 ; FP32: liveins: $a0, $a1
298 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
299 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
300 ; FP32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
301 ; FP32: $a0 = COPY [[COPY]](s32)
302 ; FP32: $a1 = COPY [[COPY1]](s32)
303 ; FP32: JAL &__floatundisf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $f0
304 ; FP32: [[COPY2:%[0-9]+]]:_(s32) = COPY $f0
305 ; FP32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
306 ; FP32: $f0 = COPY [[COPY2]](s32)
307 ; FP32: RetRA implicit $f0
308 ; FP64-LABEL: name: u64tof32
309 ; FP64: liveins: $a0, $a1
310 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
311 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
312 ; FP64: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
313 ; FP64: $a0 = COPY [[COPY]](s32)
314 ; FP64: $a1 = COPY [[COPY1]](s32)
315 ; FP64: JAL &__floatundisf, csr_o32_fp64, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $f0
316 ; FP64: [[COPY2:%[0-9]+]]:_(s32) = COPY $f0
317 ; FP64: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
318 ; FP64: $f0 = COPY [[COPY2]](s32)
319 ; FP64: RetRA implicit $f0
322 %0:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
323 %3:_(s32) = G_UITOFP %0(s64)
331 tracksRegLiveness: true
336 ; FP32-LABEL: name: u32tof32
338 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
339 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
340 ; FP32: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY]](s32), [[C]](s32)
341 ; FP32: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
342 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C1]]
343 ; FP32: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
344 ; FP32: $f0 = COPY [[FPTRUNC]](s32)
345 ; FP32: RetRA implicit $f0
346 ; FP64-LABEL: name: u32tof32
348 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
349 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
350 ; FP64: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY]](s32), [[C]](s32)
351 ; FP64: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
352 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C1]]
353 ; FP64: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
354 ; FP64: $f0 = COPY [[FPTRUNC]](s32)
355 ; FP64: RetRA implicit $f0
357 %1:_(s32) = G_UITOFP %0(s32)
365 tracksRegLiveness: true
370 ; FP32-LABEL: name: u16tof32
372 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
373 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
374 ; FP32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
375 ; FP32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
376 ; FP32: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[AND]](s32), [[C1]](s32)
377 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
378 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C2]]
379 ; FP32: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
380 ; FP32: $f0 = COPY [[FPTRUNC]](s32)
381 ; FP32: RetRA implicit $f0
382 ; FP64-LABEL: name: u16tof32
384 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
385 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
386 ; FP64: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
387 ; FP64: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
388 ; FP64: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[AND]](s32), [[C1]](s32)
389 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
390 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C2]]
391 ; FP64: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
392 ; FP64: $f0 = COPY [[FPTRUNC]](s32)
393 ; FP64: RetRA implicit $f0
395 %0:_(s16) = G_TRUNC %1(s32)
396 %2:_(s32) = G_UITOFP %0(s16)
404 tracksRegLiveness: true
409 ; FP32-LABEL: name: u8tof32
411 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
412 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
413 ; FP32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
414 ; FP32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
415 ; FP32: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[AND]](s32), [[C1]](s32)
416 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
417 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C2]]
418 ; FP32: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
419 ; FP32: $f0 = COPY [[FPTRUNC]](s32)
420 ; FP32: RetRA implicit $f0
421 ; FP64-LABEL: name: u8tof32
423 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
424 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
425 ; FP64: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
426 ; FP64: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
427 ; FP64: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[AND]](s32), [[C1]](s32)
428 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
429 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C2]]
430 ; FP64: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
431 ; FP64: $f0 = COPY [[FPTRUNC]](s32)
432 ; FP64: RetRA implicit $f0
434 %0:_(s8) = G_TRUNC %1(s32)
435 %2:_(s32) = G_UITOFP %0(s8)
443 tracksRegLiveness: true
448 ; FP32-LABEL: name: u64tof64
449 ; FP32: liveins: $a0, $a1
450 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
451 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
452 ; FP32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
453 ; FP32: $a0 = COPY [[COPY]](s32)
454 ; FP32: $a1 = COPY [[COPY1]](s32)
455 ; FP32: JAL &__floatundidf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0
456 ; FP32: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0
457 ; FP32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
458 ; FP32: $d0 = COPY [[COPY2]](s64)
459 ; FP32: RetRA implicit $d0
460 ; FP64-LABEL: name: u64tof64
461 ; FP64: liveins: $a0, $a1
462 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
463 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
464 ; FP64: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
465 ; FP64: $a0 = COPY [[COPY]](s32)
466 ; FP64: $a1 = COPY [[COPY1]](s32)
467 ; FP64: JAL &__floatundidf, csr_o32_fp64, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0_64
468 ; FP64: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0_64
469 ; FP64: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
470 ; FP64: $d0 = COPY [[COPY2]](s64)
471 ; FP64: RetRA implicit $d0
474 %0:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
475 %3:_(s64) = G_UITOFP %0(s64)
483 tracksRegLiveness: true
488 ; FP32-LABEL: name: u32tof64
490 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
491 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
492 ; FP32: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY]](s32), [[C]](s32)
493 ; FP32: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
494 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C1]]
495 ; FP32: $d0 = COPY [[FSUB]](s64)
496 ; FP32: RetRA implicit $d0
497 ; FP64-LABEL: name: u32tof64
499 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
500 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
501 ; FP64: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY]](s32), [[C]](s32)
502 ; FP64: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
503 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C1]]
504 ; FP64: $d0 = COPY [[FSUB]](s64)
505 ; FP64: RetRA implicit $d0
507 %1:_(s64) = G_UITOFP %0(s32)
515 tracksRegLiveness: true
520 ; FP32-LABEL: name: u16tof64
522 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
523 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
524 ; FP32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
525 ; FP32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
526 ; FP32: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[AND]](s32), [[C1]](s32)
527 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
528 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C2]]
529 ; FP32: $d0 = COPY [[FSUB]](s64)
530 ; FP32: RetRA implicit $d0
531 ; FP64-LABEL: name: u16tof64
533 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
534 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
535 ; FP64: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
536 ; FP64: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
537 ; FP64: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[AND]](s32), [[C1]](s32)
538 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
539 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C2]]
540 ; FP64: $d0 = COPY [[FSUB]](s64)
541 ; FP64: RetRA implicit $d0
543 %0:_(s16) = G_TRUNC %1(s32)
544 %2:_(s64) = G_UITOFP %0(s16)
552 tracksRegLiveness: true
557 ; FP32-LABEL: name: u8tof64
559 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
560 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
561 ; FP32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
562 ; FP32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
563 ; FP32: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[AND]](s32), [[C1]](s32)
564 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
565 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C2]]
566 ; FP32: $d0 = COPY [[FSUB]](s64)
567 ; FP32: RetRA implicit $d0
568 ; FP64-LABEL: name: u8tof64
570 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
571 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
572 ; FP64: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
573 ; FP64: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1127219200
574 ; FP64: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[AND]](s32), [[C1]](s32)
575 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
576 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[MV]], [[C2]]
577 ; FP64: $d0 = COPY [[FSUB]](s64)
578 ; FP64: RetRA implicit $d0
580 %0:_(s8) = G_TRUNC %1(s32)
581 %2:_(s64) = G_UITOFP %0(s8)