1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
2 # RUN: llc -mtriple=riscv32 -mattr=+d,+zfh -run-pass=legalizer %s -o - \
4 # RUN: llc -mtriple=riscv64 -mattr=+d,+zfh -run-pass=legalizer %s -o - \
13 ; CHECK-LABEL: name: fpext_f32
14 ; CHECK: liveins: $f10_h
16 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $f10_h
17 ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT [[COPY]](s16)
18 ; CHECK-NEXT: $f10_f = COPY [[FPEXT]](s32)
19 ; CHECK-NEXT: PseudoRET implicit $f10_f
20 %0:_(s16) = COPY $f10_h
21 %1:_(s32) = G_FPEXT %0(s16)
23 PseudoRET implicit $f10_f
32 ; CHECK-LABEL: name: fptrunc_f32
33 ; CHECK: liveins: $f10_f
35 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
36 ; CHECK-NEXT: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[COPY]](s32)
37 ; CHECK-NEXT: $f10_h = COPY [[FPTRUNC]](s16)
38 ; CHECK-NEXT: PseudoRET implicit $f10_h
39 %0:_(s32) = COPY $f10_f
40 %1:_(s16) = G_FPTRUNC %0(s32)
42 PseudoRET implicit $f10_h
51 ; CHECK-LABEL: name: fpext_f64
52 ; CHECK: liveins: $f10_h
54 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $f10_h
55 ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(s64) = G_FPEXT [[COPY]](s16)
56 ; CHECK-NEXT: $f10_d = COPY [[FPEXT]](s64)
57 ; CHECK-NEXT: PseudoRET implicit $f10_d
58 %0:_(s16) = COPY $f10_h
59 %1:_(s64) = G_FPEXT %0(s16)
61 PseudoRET implicit $f10_d
70 ; CHECK-LABEL: name: fptrunc_f64
71 ; CHECK: liveins: $f10_d
73 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
74 ; CHECK-NEXT: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[COPY]](s64)
75 ; CHECK-NEXT: $f10_h = COPY [[FPTRUNC]](s16)
76 ; CHECK-NEXT: PseudoRET implicit $f10_h
77 %0:_(s64) = COPY $f10_d
78 %1:_(s16) = G_FPTRUNC %0(s64)
80 PseudoRET implicit $f10_h