1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -mattr=+d,+zfh -run-pass=instruction-select \
3 # RUN: -simplify-mir -verify-machineinstrs %s -o - | FileCheck %s
4 # RUN: llc -mtriple=riscv64 -mattr=+d,+zfh -run-pass=instruction-select \
5 # RUN: -simplify-mir -verify-machineinstrs %s -o - | FileCheck %s
11 tracksRegLiveness: true
16 ; CHECK-LABEL: name: fpext_f32
17 ; CHECK: liveins: $f10_h
19 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
20 ; CHECK-NEXT: [[FCVT_S_H:%[0-9]+]]:fpr32 = nofpexcept FCVT_S_H [[COPY]], 0
21 ; CHECK-NEXT: $f10_f = COPY [[FCVT_S_H]]
22 ; CHECK-NEXT: PseudoRET implicit $f10_f
23 %0:fprb(s16) = COPY $f10_h
24 %1:fprb(s32) = G_FPEXT %0(s16)
26 PseudoRET implicit $f10_f
33 tracksRegLiveness: true
38 ; CHECK-LABEL: name: fptrunc_f32
39 ; CHECK: liveins: $f10_f
41 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr32 = COPY $f10_f
42 ; CHECK-NEXT: [[FCVT_H_S:%[0-9]+]]:fpr16 = nofpexcept FCVT_H_S [[COPY]], 7
43 ; CHECK-NEXT: $f10_h = COPY [[FCVT_H_S]]
44 ; CHECK-NEXT: PseudoRET implicit $f10_h
45 %0:fprb(s32) = COPY $f10_f
46 %1:fprb(s16) = G_FPTRUNC %0(s32)
48 PseudoRET implicit $f10_h
55 tracksRegLiveness: true
60 ; CHECK-LABEL: name: fpext_f64
61 ; CHECK: liveins: $f10_h
63 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr16 = COPY $f10_h
64 ; CHECK-NEXT: [[FCVT_D_H:%[0-9]+]]:fpr64 = nofpexcept FCVT_D_H [[COPY]], 0
65 ; CHECK-NEXT: $f10_d = COPY [[FCVT_D_H]]
66 ; CHECK-NEXT: PseudoRET implicit $f10_d
67 %0:fprb(s16) = COPY $f10_h
68 %1:fprb(s64) = G_FPEXT %0(s16)
70 PseudoRET implicit $f10_d
77 tracksRegLiveness: true
82 ; CHECK-LABEL: name: fptrunc_f64
83 ; CHECK: liveins: $f10_d
85 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $f10_d
86 ; CHECK-NEXT: [[FCVT_H_D:%[0-9]+]]:fpr16 = nofpexcept FCVT_H_D [[COPY]], 7
87 ; CHECK-NEXT: $f10_h = COPY [[FCVT_H_D]]
88 ; CHECK-NEXT: PseudoRET implicit $f10_h
89 %0:fprb(s64) = COPY $f10_d
90 %1:fprb(s16) = G_FPTRUNC %0(s64)
92 PseudoRET implicit $f10_h