1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -mattr=+zfh -run-pass=instruction-select \
3 # RUN: -simplify-mir -verify-machineinstrs %s -o - | FileCheck %s
9 tracksRegLiveness: true
14 ; CHECK-LABEL: name: fptosi_s32_s16
15 ; CHECK: liveins: $f10_h
17 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
18 ; CHECK-NEXT: [[FCVT_W_H:%[0-9]+]]:gpr = nofpexcept FCVT_W_H [[COPY]], 1
19 ; CHECK-NEXT: $x10 = COPY [[FCVT_W_H]]
20 ; CHECK-NEXT: PseudoRET implicit $x10
21 %0:fprb(s16) = COPY $f10_h
22 %1:gprb(s32) = G_FPTOSI %0(s16)
23 %2:gprb(s64) = G_ANYEXT %1(s32)
25 PseudoRET implicit $x10
32 tracksRegLiveness: true
37 ; CHECK-LABEL: name: fptoui_s32_s16
38 ; CHECK: liveins: $f10_h
40 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
41 ; CHECK-NEXT: [[FCVT_WU_H:%[0-9]+]]:gpr = nofpexcept FCVT_WU_H [[COPY]], 1
42 ; CHECK-NEXT: $x10 = COPY [[FCVT_WU_H]]
43 ; CHECK-NEXT: PseudoRET implicit $x10
44 %0:fprb(s16) = COPY $f10_h
45 %1:gprb(s32) = G_FPTOUI %0(s16)
46 %2:gprb(s64) = G_ANYEXT %1(s32)
48 PseudoRET implicit $x10
55 tracksRegLiveness: true
60 ; CHECK-LABEL: name: fptosi_s64_s16
61 ; CHECK: liveins: $f10_h
63 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
64 ; CHECK-NEXT: [[FCVT_L_H:%[0-9]+]]:gpr = nofpexcept FCVT_L_H [[COPY]], 1
65 ; CHECK-NEXT: $x10 = COPY [[FCVT_L_H]]
66 ; CHECK-NEXT: PseudoRET implicit $x10
67 %0:fprb(s16) = COPY $f10_h
68 %1:gprb(s64) = G_FPTOSI %0(s16)
70 PseudoRET implicit $x10
77 tracksRegLiveness: true
82 ; CHECK-LABEL: name: fptoui_s64_s16
83 ; CHECK: liveins: $f10_h
85 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
86 ; CHECK-NEXT: [[FCVT_LU_H:%[0-9]+]]:gpr = nofpexcept FCVT_LU_H [[COPY]], 1
87 ; CHECK-NEXT: $x10 = COPY [[FCVT_LU_H]]
88 ; CHECK-NEXT: PseudoRET implicit $x10
89 %0:fprb(s16) = COPY $f10_h
90 %1:gprb(s64) = G_FPTOUI %0(s16)
92 PseudoRET implicit $x10