llvm/llvm/test/CodeGen/RISCV/GlobalISel/regbankselect/minmax-rv32.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=riscv32 -mattr=+zbb -run-pass=regbankselect \
# RUN:   -disable-gisel-legality-check -simplify-mir -verify-machineinstrs %s \
# RUN:   -o - | FileCheck -check-prefix=RV32I %s

---
name:            smax_i32
legalized:       true
body:             |
  bb.0.entry:
    ; RV32I-LABEL: name: smax_i32
    ; RV32I: [[COPY:%[0-9]+]]:gprb(s32) = COPY $x10
    ; RV32I-NEXT: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $x11
    ; RV32I-NEXT: [[SMAX:%[0-9]+]]:gprb(s32) = G_SMAX [[COPY]], [[COPY1]]
    ; RV32I-NEXT: $x10 = COPY [[SMAX]](s32)
    ; RV32I-NEXT: PseudoRET implicit $x10
    %0:_(s32) = COPY $x10
    %1:_(s32) = COPY $x11
    %2:_(s32) = G_SMAX %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            smin_i32
legalized:       true
body:             |
  bb.0.entry:
    ; RV32I-LABEL: name: smin_i32
    ; RV32I: [[COPY:%[0-9]+]]:gprb(s32) = COPY $x10
    ; RV32I-NEXT: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $x11
    ; RV32I-NEXT: [[SMIN:%[0-9]+]]:gprb(s32) = G_SMIN [[COPY]], [[COPY1]]
    ; RV32I-NEXT: $x10 = COPY [[SMIN]](s32)
    ; RV32I-NEXT: PseudoRET implicit $x10
    %0:_(s32) = COPY $x10
    %1:_(s32) = COPY $x11
    %2:_(s32) = G_SMIN %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            umax_i32
legalized:       true
body:             |
  bb.0.entry:
    ; RV32I-LABEL: name: umax_i32
    ; RV32I: [[COPY:%[0-9]+]]:gprb(s32) = COPY $x10
    ; RV32I-NEXT: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $x11
    ; RV32I-NEXT: [[UMAX:%[0-9]+]]:gprb(s32) = G_UMAX [[COPY]], [[COPY1]]
    ; RV32I-NEXT: $x10 = COPY [[UMAX]](s32)
    ; RV32I-NEXT: PseudoRET implicit $x10
    %0:_(s32) = COPY $x10
    %1:_(s32) = COPY $x11
    %2:_(s32) = G_UMAX %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            umin_i32
legalized:       true
body:             |
  bb.0.entry:
    ; RV32I-LABEL: name: umin_i32
    ; RV32I: [[COPY:%[0-9]+]]:gprb(s32) = COPY $x10
    ; RV32I-NEXT: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $x11
    ; RV32I-NEXT: [[UMIN:%[0-9]+]]:gprb(s32) = G_UMIN [[COPY]], [[COPY1]]
    ; RV32I-NEXT: $x10 = COPY [[UMIN]](s32)
    ; RV32I-NEXT: PseudoRET implicit $x10
    %0:_(s32) = COPY $x10
    %1:_(s32) = COPY $x11
    %2:_(s32) = G_UMIN %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...