1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -mattr=+d -run-pass=instruction-select \
3 # RUN: -simplify-mir -verify-machineinstrs %s -o - | FileCheck %s
9 tracksRegLiveness: true
14 ; CHECK-LABEL: name: fptosi_s32_s32
15 ; CHECK: liveins: $f10_f
17 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr32 = COPY $f10_f
18 ; CHECK-NEXT: [[FCVT_W_S:%[0-9]+]]:gpr = nofpexcept FCVT_W_S [[COPY]], 1
19 ; CHECK-NEXT: $x10 = COPY [[FCVT_W_S]]
20 ; CHECK-NEXT: PseudoRET implicit $x10
21 %0:fprb(s32) = COPY $f10_f
22 %1:gprb(s32) = G_FPTOSI %0(s32)
23 %2:gprb(s64) = G_ANYEXT %1(s32)
25 PseudoRET implicit $x10
32 tracksRegLiveness: true
37 ; CHECK-LABEL: name: fptoui_s32_s32
38 ; CHECK: liveins: $f10_f
40 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr32 = COPY $f10_f
41 ; CHECK-NEXT: [[FCVT_WU_S:%[0-9]+]]:gpr = nofpexcept FCVT_WU_S [[COPY]], 1
42 ; CHECK-NEXT: $x10 = COPY [[FCVT_WU_S]]
43 ; CHECK-NEXT: PseudoRET implicit $x10
44 %0:fprb(s32) = COPY $f10_f
45 %1:gprb(s32) = G_FPTOUI %0(s32)
46 %2:gprb(s64) = G_ANYEXT %1(s32)
48 PseudoRET implicit $x10
55 tracksRegLiveness: true
60 ; CHECK-LABEL: name: fptosi_s64_s32
61 ; CHECK: liveins: $f10_f
63 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr32 = COPY $f10_f
64 ; CHECK-NEXT: [[FCVT_L_S:%[0-9]+]]:gpr = nofpexcept FCVT_L_S [[COPY]], 1
65 ; CHECK-NEXT: $x10 = COPY [[FCVT_L_S]]
66 ; CHECK-NEXT: PseudoRET implicit $x10
67 %0:fprb(s32) = COPY $f10_f
68 %1:gprb(s64) = G_FPTOSI %0(s32)
70 PseudoRET implicit $x10
77 tracksRegLiveness: true
82 ; CHECK-LABEL: name: fptoui_s64_s32
83 ; CHECK: liveins: $f10_f
85 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr32 = COPY $f10_f
86 ; CHECK-NEXT: [[FCVT_LU_S:%[0-9]+]]:gpr = nofpexcept FCVT_LU_S [[COPY]], 1
87 ; CHECK-NEXT: $x10 = COPY [[FCVT_LU_S]]
88 ; CHECK-NEXT: PseudoRET implicit $x10
89 %0:fprb(s32) = COPY $f10_f
90 %1:gprb(s64) = G_FPTOUI %0(s32)
92 PseudoRET implicit $x10
99 tracksRegLiveness: true
104 ; CHECK-LABEL: name: fptosi_s32_s64
105 ; CHECK: liveins: $f10_d
107 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $f10_d
108 ; CHECK-NEXT: [[FCVT_W_D:%[0-9]+]]:gpr = nofpexcept FCVT_W_D [[COPY]], 1
109 ; CHECK-NEXT: $x10 = COPY [[FCVT_W_D]]
110 ; CHECK-NEXT: PseudoRET implicit $x10
111 %0:fprb(s64) = COPY $f10_d
112 %1:gprb(s32) = G_FPTOSI %0(s64)
113 %2:gprb(s64) = G_ANYEXT %1(s32)
115 PseudoRET implicit $x10
121 regBankSelected: true
122 tracksRegLiveness: true
127 ; CHECK-LABEL: name: fptoui_s32_s64
128 ; CHECK: liveins: $f10_d
130 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $f10_d
131 ; CHECK-NEXT: [[FCVT_WU_D:%[0-9]+]]:gpr = nofpexcept FCVT_WU_D [[COPY]], 1
132 ; CHECK-NEXT: $x10 = COPY [[FCVT_WU_D]]
133 ; CHECK-NEXT: PseudoRET implicit $x10
134 %0:fprb(s64) = COPY $f10_d
135 %1:gprb(s32) = G_FPTOUI %0(s64)
136 %2:gprb(s64) = G_ANYEXT %1(s32)
138 PseudoRET implicit $x10
144 regBankSelected: true
145 tracksRegLiveness: true
150 ; CHECK-LABEL: name: fptosi_s64_s64
151 ; CHECK: liveins: $f10_d
153 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $f10_d
154 ; CHECK-NEXT: [[FCVT_L_D:%[0-9]+]]:gpr = nofpexcept FCVT_L_D [[COPY]], 1
155 ; CHECK-NEXT: $x10 = COPY [[FCVT_L_D]]
156 ; CHECK-NEXT: PseudoRET implicit $x10
157 %0:fprb(s64) = COPY $f10_d
158 %1:gprb(s64) = G_FPTOSI %0(s64)
160 PseudoRET implicit $x10
166 regBankSelected: true
167 tracksRegLiveness: true
172 ; CHECK-LABEL: name: fptoui_s64_s64
173 ; CHECK: liveins: $f10_d
175 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $f10_d
176 ; CHECK-NEXT: [[FCVT_LU_D:%[0-9]+]]:gpr = nofpexcept FCVT_LU_D [[COPY]], 1
177 ; CHECK-NEXT: $x10 = COPY [[FCVT_LU_D]]
178 ; CHECK-NEXT: PseudoRET implicit $x10
179 %0:fprb(s64) = COPY $f10_d
180 %1:gprb(s64) = G_FPTOUI %0(s64)
182 PseudoRET implicit $x10