1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP32
3 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP64
6 define void @i32tof32() {entry: ret void}
7 define void @i32tof64() {entry: ret void}
8 define void @u32tof64() {entry: ret void}
15 tracksRegLiveness: true
20 ; FP32-LABEL: name: i32tof32
22 ; FP32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
23 ; FP32: [[SITOFP:%[0-9]+]]:fprb(s32) = G_SITOFP [[COPY]](s32)
24 ; FP32: $f0 = COPY [[SITOFP]](s32)
25 ; FP32: RetRA implicit $f0
26 ; FP64-LABEL: name: i32tof32
28 ; FP64: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
29 ; FP64: [[SITOFP:%[0-9]+]]:fprb(s32) = G_SITOFP [[COPY]](s32)
30 ; FP64: $f0 = COPY [[SITOFP]](s32)
31 ; FP64: RetRA implicit $f0
33 %1:_(s32) = G_SITOFP %0(s32)
42 tracksRegLiveness: true
47 ; FP32-LABEL: name: i32tof64
49 ; FP32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
50 ; FP32: [[SITOFP:%[0-9]+]]:fprb(s64) = G_SITOFP [[COPY]](s32)
51 ; FP32: $d0 = COPY [[SITOFP]](s64)
52 ; FP32: RetRA implicit $d0
53 ; FP64-LABEL: name: i32tof64
55 ; FP64: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
56 ; FP64: [[SITOFP:%[0-9]+]]:fprb(s64) = G_SITOFP [[COPY]](s32)
57 ; FP64: $d0 = COPY [[SITOFP]](s64)
58 ; FP64: RetRA implicit $d0
60 %1:_(s64) = G_SITOFP %0(s32)
69 tracksRegLiveness: true
74 ; FP32-LABEL: name: u32tof64
76 ; FP32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
77 ; FP32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1127219200
78 ; FP32: [[MV:%[0-9]+]]:fprb(s64) = G_MERGE_VALUES [[COPY]](s32), [[C]](s32)
79 ; FP32: [[C1:%[0-9]+]]:fprb(s64) = G_FCONSTANT double 0x4330000000000000
80 ; FP32: [[FSUB:%[0-9]+]]:fprb(s64) = G_FSUB [[MV]], [[C1]]
81 ; FP32: $d0 = COPY [[FSUB]](s64)
82 ; FP32: RetRA implicit $d0
83 ; FP64-LABEL: name: u32tof64
85 ; FP64: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
86 ; FP64: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1127219200
87 ; FP64: [[MV:%[0-9]+]]:fprb(s64) = G_MERGE_VALUES [[COPY]](s32), [[C]](s32)
88 ; FP64: [[C1:%[0-9]+]]:fprb(s64) = G_FCONSTANT double 0x4330000000000000
89 ; FP64: [[FSUB:%[0-9]+]]:fprb(s64) = G_FSUB [[MV]], [[C1]]
90 ; FP64: $d0 = COPY [[FSUB]](s64)
91 ; FP64: RetRA implicit $d0
93 %2:_(s32) = G_CONSTANT i32 1127219200
94 %3:_(s64) = G_MERGE_VALUES %0(s32), %2(s32)
95 %4:_(s64) = G_FCONSTANT double 0x4330000000000000
96 %1:_(s64) = G_FSUB %3, %4