llvm/llvm/test/CodeGen/RISCV/GlobalISel/regbankselect/merge-unmerge-rv32.mir

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

---
name:            merge_i64
legalized: true
body:             |
  bb.0.entry:
    liveins: $x10
    ; CHECK-LABEL: name: merge_i64
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gprb(s32) = COPY $x10
    ; CHECK-NEXT: [[MV:%[0-9]+]]:fprb(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY]](s32)
    ; CHECK-NEXT: $f10_d = COPY [[MV]](s64)
    ; CHECK-NEXT: PseudoRET implicit $f10_d
    %0:_(s32) = COPY $x10
    %1:_(s64) = G_MERGE_VALUES %0(s32), %0(s32)
    $f10_d = COPY %1(s64)
    PseudoRET implicit $f10_d
...
---
name:            unmerge_i32
legalized: true
body:             |
  bb.0.entry:
    liveins: $f10_d
    ; CHECK-LABEL: name: unmerge_i32
    ; CHECK: liveins: $f10_d
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s64) = COPY $f10_d
    ; CHECK-NEXT: [[UV:%[0-9]+]]:gprb(s32), [[UV1:%[0-9]+]]:gprb(s32) = G_UNMERGE_VALUES [[COPY]](s64)
    ; CHECK-NEXT: $x10 = COPY [[UV]](s32)
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:_(s64) = COPY $f10_d
    %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0(s64)
    $x10 = COPY %1(s32)
    PseudoRET implicit $x10
...