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]+]]:gpr32(s32) = COPY $a0
347 ; FP32: [[C:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
348 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[COPY]](s32), [[C]](s32)
349 ; FP32: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
350 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C1]]
351 ; FP32: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
352 ; FP32: $f0 = COPY [[FPTRUNC]](s32)
353 ; FP32: RetRA implicit $f0
354 ; FP64-LABEL: name: u32tof32
356 ; FP64: [[COPY:%[0-9]+]]:gpr32(s32) = COPY $a0
357 ; FP64: [[C:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
358 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[COPY]](s32), [[C]](s32)
359 ; FP64: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
360 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C1]]
361 ; FP64: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
362 ; FP64: $f0 = COPY [[FPTRUNC]](s32)
363 ; FP64: RetRA implicit $f0
365 %1:_(s32) = G_UITOFP %0(s32)
373 tracksRegLiveness: true
378 ; FP32-LABEL: name: u16tof32
380 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
381 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
382 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
383 ; FP32: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
384 ; FP32: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
385 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[AND]](s32), [[C1]](s32)
386 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
387 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C2]]
388 ; FP32: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
389 ; FP32: $f0 = COPY [[FPTRUNC]](s32)
390 ; FP32: RetRA implicit $f0
391 ; FP64-LABEL: name: u16tof32
393 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
394 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
395 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
396 ; FP64: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
397 ; FP64: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
398 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[AND]](s32), [[C1]](s32)
399 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
400 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C2]]
401 ; FP64: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
402 ; FP64: $f0 = COPY [[FPTRUNC]](s32)
403 ; FP64: RetRA implicit $f0
405 %0:_(s16) = G_TRUNC %1(s32)
406 %2:_(s32) = G_UITOFP %0(s16)
414 tracksRegLiveness: true
419 ; FP32-LABEL: name: u8tof32
421 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
422 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
423 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
424 ; FP32: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
425 ; FP32: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
426 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[AND]](s32), [[C1]](s32)
427 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
428 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C2]]
429 ; FP32: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
430 ; FP32: $f0 = COPY [[FPTRUNC]](s32)
431 ; FP32: RetRA implicit $f0
432 ; FP64-LABEL: name: u8tof32
434 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
435 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
436 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
437 ; FP64: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
438 ; FP64: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
439 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[AND]](s32), [[C1]](s32)
440 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
441 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C2]]
442 ; FP64: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[FSUB]](s64)
443 ; FP64: $f0 = COPY [[FPTRUNC]](s32)
444 ; FP64: RetRA implicit $f0
446 %0:_(s8) = G_TRUNC %1(s32)
447 %2:_(s32) = G_UITOFP %0(s8)
455 tracksRegLiveness: true
460 ; FP32-LABEL: name: u64tof64
461 ; FP32: liveins: $a0, $a1
462 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
463 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
464 ; FP32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
465 ; FP32: $a0 = COPY [[COPY]](s32)
466 ; FP32: $a1 = COPY [[COPY1]](s32)
467 ; FP32: JAL &__floatundidf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0
468 ; FP32: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0
469 ; FP32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
470 ; FP32: $d0 = COPY [[COPY2]](s64)
471 ; FP32: RetRA implicit $d0
472 ; FP64-LABEL: name: u64tof64
473 ; FP64: liveins: $a0, $a1
474 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
475 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
476 ; FP64: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
477 ; FP64: $a0 = COPY [[COPY]](s32)
478 ; FP64: $a1 = COPY [[COPY1]](s32)
479 ; FP64: JAL &__floatundidf, csr_o32_fp64, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $d0_64
480 ; FP64: [[COPY2:%[0-9]+]]:_(s64) = COPY $d0_64
481 ; FP64: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
482 ; FP64: $d0 = COPY [[COPY2]](s64)
483 ; FP64: RetRA implicit $d0
486 %0:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
487 %3:_(s64) = G_UITOFP %0(s64)
495 tracksRegLiveness: true
500 ; FP32-LABEL: name: u32tof64
502 ; FP32: [[COPY:%[0-9]+]]:gpr32(s32) = COPY $a0
503 ; FP32: [[C:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
504 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[COPY]](s32), [[C]](s32)
505 ; FP32: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
506 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C1]]
507 ; FP32: $d0 = COPY [[FSUB]](s64)
508 ; FP32: RetRA implicit $d0
509 ; FP64-LABEL: name: u32tof64
511 ; FP64: [[COPY:%[0-9]+]]:gpr32(s32) = COPY $a0
512 ; FP64: [[C:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
513 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[COPY]](s32), [[C]](s32)
514 ; FP64: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
515 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C1]]
516 ; FP64: $d0 = COPY [[FSUB]](s64)
517 ; FP64: RetRA implicit $d0
519 %1:_(s64) = G_UITOFP %0(s32)
527 tracksRegLiveness: true
532 ; FP32-LABEL: name: u16tof64
534 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
535 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
536 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
537 ; FP32: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
538 ; FP32: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
539 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[AND]](s32), [[C1]](s32)
540 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
541 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C2]]
542 ; FP32: $d0 = COPY [[FSUB]](s64)
543 ; FP32: RetRA implicit $d0
544 ; FP64-LABEL: name: u16tof64
546 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
547 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
548 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
549 ; FP64: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
550 ; FP64: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
551 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[AND]](s32), [[C1]](s32)
552 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
553 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C2]]
554 ; FP64: $d0 = COPY [[FSUB]](s64)
555 ; FP64: RetRA implicit $d0
557 %0:_(s16) = G_TRUNC %1(s32)
558 %2:_(s64) = G_UITOFP %0(s16)
566 tracksRegLiveness: true
571 ; FP32-LABEL: name: u8tof64
573 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
574 ; FP32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
575 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
576 ; FP32: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
577 ; FP32: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
578 ; FP32: [[BuildPairF64_:%[0-9]+]]:afgr64(s64) = BuildPairF64 [[AND]](s32), [[C1]](s32)
579 ; FP32: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
580 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_]], [[C2]]
581 ; FP32: $d0 = COPY [[FSUB]](s64)
582 ; FP32: RetRA implicit $d0
583 ; FP64-LABEL: name: u8tof64
585 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
586 ; FP64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
587 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
588 ; FP64: [[AND:%[0-9]+]]:gpr32(s32) = G_AND [[COPY1]], [[C]]
589 ; FP64: [[C1:%[0-9]+]]:gpr32(s32) = G_CONSTANT i32 1127219200
590 ; FP64: [[BuildPairF64_64_:%[0-9]+]]:fgr64(s64) = BuildPairF64_64 [[AND]](s32), [[C1]](s32)
591 ; FP64: [[C2:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4330000000000000
592 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[BuildPairF64_64_]], [[C2]]
593 ; FP64: $d0 = COPY [[FSUB]](s64)
594 ; FP64: RetRA implicit $d0
596 %0:_(s8) = G_TRUNC %1(s32)
597 %2:_(s64) = G_UITOFP %0(s8)