1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -mattr=+d -run-pass=regbankselect \
3 # RUN: -simplify-mir -verify-machineinstrs %s \
4 # RUN: -o - | FileCheck %s
9 tracksRegLiveness: true
14 ; CHECK-LABEL: name: fptosi_s32_s32
15 ; CHECK: liveins: $f10_f
17 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f10_f
18 ; CHECK-NEXT: [[FCVT_W_RV64_:%[0-9]+]]:gprb(s64) = G_FCVT_W_RV64 [[COPY]](s32), 1
19 ; CHECK-NEXT: $x10 = COPY [[FCVT_W_RV64_]](s64)
20 ; CHECK-NEXT: PseudoRET implicit $x10
21 %0:_(s32) = COPY $f10_f
22 %1:_(s64) = G_FCVT_W_RV64 %0(s32), 1
24 PseudoRET implicit $x10
30 tracksRegLiveness: true
35 ; CHECK-LABEL: name: fptoui_s32_s32
36 ; CHECK: liveins: $f10_f
38 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f10_f
39 ; CHECK-NEXT: [[FCVT_WU_RV64_:%[0-9]+]]:gprb(s64) = G_FCVT_WU_RV64 [[COPY]](s32), 1
40 ; CHECK-NEXT: $x10 = COPY [[FCVT_WU_RV64_]](s64)
41 ; CHECK-NEXT: PseudoRET implicit $x10
42 %0:_(s32) = COPY $f10_f
43 %1:_(s64) = G_FCVT_WU_RV64 %0(s32), 1
45 PseudoRET implicit $x10
51 tracksRegLiveness: true
56 ; CHECK-LABEL: name: fptosi_s64_s32
57 ; CHECK: liveins: $f10_f
59 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f10_f
60 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:gprb(s64) = G_FPTOSI [[COPY]](s32)
61 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s64)
62 ; CHECK-NEXT: PseudoRET implicit $x10
63 %0:_(s32) = COPY $f10_f
64 %1:_(s64) = G_FPTOSI %0(s32)
66 PseudoRET implicit $x10
72 tracksRegLiveness: true
77 ; CHECK-LABEL: name: fptoui_s64_s32
78 ; CHECK: liveins: $f10_f
80 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f10_f
81 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:gprb(s64) = G_FPTOUI [[COPY]](s32)
82 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s64)
83 ; CHECK-NEXT: PseudoRET implicit $x10
84 %0:_(s32) = COPY $f10_f
85 %1:_(s64) = G_FPTOUI %0(s32)
87 PseudoRET implicit $x10
93 tracksRegLiveness: true
98 ; CHECK-LABEL: name: fptosi_s32_s64
99 ; CHECK: liveins: $f10_d
101 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s64) = COPY $f10_d
102 ; CHECK-NEXT: [[FCVT_W_RV64_:%[0-9]+]]:gprb(s64) = G_FCVT_W_RV64 [[COPY]](s64), 1
103 ; CHECK-NEXT: $x10 = COPY [[FCVT_W_RV64_]](s64)
104 ; CHECK-NEXT: PseudoRET implicit $x10
105 %0:_(s64) = COPY $f10_d
106 %1:_(s64) = G_FCVT_W_RV64 %0(s64), 1
108 PseudoRET implicit $x10
114 tracksRegLiveness: true
119 ; CHECK-LABEL: name: fptoui_s32_s64
120 ; CHECK: liveins: $f10_d
122 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s64) = COPY $f10_d
123 ; CHECK-NEXT: [[FCVT_W_RV64_:%[0-9]+]]:gprb(s64) = G_FCVT_W_RV64 [[COPY]](s64), 1
124 ; CHECK-NEXT: $x10 = COPY [[FCVT_W_RV64_]](s64)
125 ; CHECK-NEXT: PseudoRET implicit $x10
126 %0:_(s64) = COPY $f10_d
127 %1:_(s64) = G_FCVT_W_RV64 %0(s64), 1
129 PseudoRET implicit $x10
135 tracksRegLiveness: true
140 ; CHECK-LABEL: name: fptosi_s64_s64
141 ; CHECK: liveins: $f10_d
143 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s64) = COPY $f10_d
144 ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:gprb(s64) = G_FPTOSI [[COPY]](s64)
145 ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s64)
146 ; CHECK-NEXT: PseudoRET implicit $x10
147 %0:_(s64) = COPY $f10_d
148 %1:_(s64) = G_FPTOSI %0(s64)
150 PseudoRET implicit $x10
156 tracksRegLiveness: true
161 ; CHECK-LABEL: name: fptoui_s64_s64
162 ; CHECK: liveins: $f10_d
164 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s64) = COPY $f10_d
165 ; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:gprb(s64) = G_FPTOUI [[COPY]](s64)
166 ; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s64)
167 ; CHECK-NEXT: PseudoRET implicit $x10
168 %0:_(s64) = COPY $f10_d
169 %1:_(s64) = G_FPTOUI %0(s64)
171 PseudoRET implicit $x10