# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=riscv64 -mattr=+zfh -run-pass=regbankselect \
# RUN: -simplify-mir -verify-machineinstrs %s \
# RUN: -o - | FileCheck %s
---
name: fptosi_s32_s16
legalized: true
tracksRegLiveness: true
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptosi_s32_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:gprb(s32) = G_FPTOSI [[COPY]](s16)
; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:gprb(s64) = G_ANYEXT [[FPTOSI]](s32)
; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s32) = G_FPTOSI %0(s16)
%2:_(s64) = G_ANYEXT %1(s32)
$x10 = COPY %2(s64)
PseudoRET implicit $x10
...
---
name: fptoui_s32_s16
legalized: true
tracksRegLiveness: true
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptoui_s32_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:gprb(s32) = G_FPTOUI [[COPY]](s16)
; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:gprb(s64) = G_ANYEXT [[FPTOUI]](s32)
; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s32) = G_FPTOUI %0(s16)
%2:_(s64) = G_ANYEXT %1(s32)
$x10 = COPY %2(s64)
PseudoRET implicit $x10
...
---
name: fptosi_s64_s16
legalized: true
tracksRegLiveness: true
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptosi_s64_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:gprb(s64) = G_FPTOSI [[COPY]](s16)
; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s64)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s64) = G_FPTOSI %0(s16)
$x10 = COPY %1(s64)
PseudoRET implicit $x10
...
---
name: fptoui_s64_s16
legalized: true
tracksRegLiveness: true
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptoui_s64_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:gprb(s64) = G_FPTOUI [[COPY]](s16)
; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s64)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s64) = G_FPTOUI %0(s16)
$x10 = COPY %1(s64)
PseudoRET implicit $x10
...