1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -mattr=+d -run-pass=instruction-select \
3 # RUN: -simplify-mir -verify-machineinstrs %s -o - | FileCheck %s
9 tracksRegLiveness: true
14 ; CHECK-LABEL: name: sitofp_s32_s32
15 ; CHECK: liveins: $x10
17 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
18 ; CHECK-NEXT: [[FCVT_S_W:%[0-9]+]]:fpr32 = nofpexcept FCVT_S_W [[COPY]], 7
19 ; CHECK-NEXT: $f10_f = COPY [[FCVT_S_W]]
20 ; CHECK-NEXT: PseudoRET implicit $f10_f
21 %0:gprb(s32) = COPY $x10
22 %1:fprb(s32) = G_SITOFP %0(s32)
24 PseudoRET implicit $f10_f
31 tracksRegLiveness: true
36 ; CHECK-LABEL: name: uitofp_s32_s32
37 ; CHECK: liveins: $x10
39 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
40 ; CHECK-NEXT: [[FCVT_S_WU:%[0-9]+]]:fpr32 = nofpexcept FCVT_S_WU [[COPY]], 7
41 ; CHECK-NEXT: $f10_f = COPY [[FCVT_S_WU]]
42 ; CHECK-NEXT: PseudoRET implicit $f10_f
43 %0:gprb(s32) = COPY $x10
44 %1:fprb(s32) = G_UITOFP %0(s32)
46 PseudoRET implicit $f10_f
53 tracksRegLiveness: true
58 ; CHECK-LABEL: name: sitofp_s64_s32
59 ; CHECK: liveins: $x10
61 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
62 ; CHECK-NEXT: [[FCVT_D_W:%[0-9]+]]:fpr64 = nofpexcept FCVT_D_W [[COPY]], 0
63 ; CHECK-NEXT: $f10_d = COPY [[FCVT_D_W]]
64 ; CHECK-NEXT: PseudoRET implicit $f10_d
65 %0:gprb(s32) = COPY $x10
66 %1:fprb(s64) = G_SITOFP %0(s32)
68 PseudoRET implicit $f10_d
75 tracksRegLiveness: true
80 ; CHECK-LABEL: name: uitofp_s64_s32
81 ; CHECK: liveins: $x10
83 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
84 ; CHECK-NEXT: [[FCVT_D_WU:%[0-9]+]]:fpr64 = nofpexcept FCVT_D_WU [[COPY]], 0
85 ; CHECK-NEXT: $f10_d = COPY [[FCVT_D_WU]]
86 ; CHECK-NEXT: PseudoRET implicit $f10_d
87 %0:gprb(s32) = COPY $x10
88 %1:fprb(s64) = G_UITOFP %0(s32)
90 PseudoRET implicit $f10_d