# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=riscv32 -mattr=+zfh -run-pass=legalizer %s -o - \
# RUN: | FileCheck %s
---
name: fptoui_s1_s16
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptoui_s1_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s16)
; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s1) = G_FPTOUI %0(s16)
%2:_(s32) = G_ANYEXT %1(s1)
$x10 = COPY %2(s32)
PseudoRET implicit $x10
...
---
name: fptosi_s8_s16
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptosi_s8_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s16)
; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s8) = G_FPTOSI %0(s16)
%2:_(s32) = G_ANYEXT %1(s8)
$x10 = COPY %2(s32)
PseudoRET implicit $x10
...
---
name: fptoui_s8_s16
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptoui_s8_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s16)
; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s8) = G_FPTOUI %0(s16)
%2:_(s32) = G_ANYEXT %1(s8)
$x10 = COPY %2(s32)
PseudoRET implicit $x10
...
---
name: fptosi_s16_s16
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptosi_s16_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s16)
; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s16) = G_FPTOSI %0(s16)
%2:_(s32) = G_ANYEXT %1(s16)
$x10 = COPY %2(s32)
PseudoRET implicit $x10
...
---
name: fptoui_s16_s16
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptoui_s16_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s16)
; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s16) = G_FPTOUI %0(s16)
%2:_(s32) = G_ANYEXT %1(s16)
$x10 = COPY %2(s32)
PseudoRET implicit $x10
...
---
name: fptosi_s32_s16
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptosi_s32_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s16)
; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s32) = G_FPTOSI %0(s16)
$x10 = COPY %1(s32)
PseudoRET implicit $x10
...
---
name: fptoui_s32_s16
body: |
bb.1:
liveins: $f10_h
; CHECK-LABEL: name: fptoui_s32_s16
; CHECK: liveins: $f10_h
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $f10_h
; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s16)
; CHECK-NEXT: $x10 = COPY [[FPTOUI]](s32)
; CHECK-NEXT: PseudoRET implicit $x10
%0:_(s16) = COPY $f10_h
%1:_(s32) = G_FPTOUI %0(s16)
$x10 = COPY %1(s32)
PseudoRET implicit $x10
...