llvm/llvm/test/CodeGen/RISCV/GlobalISel/regbankselect/fp-ext-trunc.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=riscv32 -mattr=+d -run-pass=regbankselect \
# RUN:   -simplify-mir -verify-machineinstrs %s \
# RUN:   -o - | FileCheck %s
# RUN: llc -mtriple=riscv64 -mattr=+d -run-pass=regbankselect \
# RUN:   -simplify-mir -verify-machineinstrs %s \
# RUN:   -o - | FileCheck %s

---
name:            fpext
legalized:       true
tracksRegLiveness: true
body:             |
  bb.1:
    liveins: $f10_f

    ; CHECK-LABEL: name: fpext
    ; CHECK: liveins: $f10_f
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f10_f
    ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:fprb(s64) = G_FPEXT [[COPY]](s32)
    ; CHECK-NEXT: $f10_d = COPY [[FPEXT]](s64)
    ; CHECK-NEXT: PseudoRET implicit $f10_d
    %0:_(s32) = COPY $f10_f
    %1:_(s64) = G_FPEXT %0(s32)
    $f10_d = COPY %1(s64)
    PseudoRET implicit $f10_d

...
---
name:            fptrunc
legalized:       true
tracksRegLiveness: true
body:             |
  bb.1:
    liveins: $f10_d

    ; CHECK-LABEL: name: fptrunc
    ; CHECK: liveins: $f10_d
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s64) = COPY $f10_d
    ; CHECK-NEXT: [[FPTRUNC:%[0-9]+]]:fprb(s32) = G_FPTRUNC [[COPY]](s64)
    ; CHECK-NEXT: $f10_f = COPY [[FPTRUNC]](s32)
    ; CHECK-NEXT: PseudoRET implicit $f10_f
    %0:_(s64) = COPY $f10_d
    %1:_(s32) = G_FPTRUNC %0(s64)
    $f10_f = COPY %1(s32)
    PseudoRET implicit $f10_f

...