llvm/llvm/test/CodeGen/RISCV/GlobalISel/regbankselect/is-fpclass-rv32.mir

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

---
name:            is_fpclass_f32
legalized:       true
body:             |
  bb.0:
    liveins: $f10_f

    ; CHECK-LABEL: name: is_fpclass_f32
    ; CHECK: liveins: $f10_f
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f10_f
    ; CHECK-NEXT: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 152
    ; CHECK-NEXT: [[C1:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 0
    ; CHECK-NEXT: [[FCLASS:%[0-9]+]]:gprb(s32) = G_FCLASS [[COPY]](s32)
    ; CHECK-NEXT: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[FCLASS]], [[C]]
    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:gprb(s32) = G_ICMP intpred(ne), [[AND]](s32), [[C1]]
    ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:_(s32) = COPY $f10_f
    %3:_(s32) = G_CONSTANT i32 152
    %4:_(s32) = G_CONSTANT i32 0
    %5:_(s32) = G_FCLASS %0(s32)
    %6:_(s32) = G_AND %5, %3
    %7:_(s32) = G_ICMP intpred(ne), %6(s32), %4
    $x10 = COPY %7(s32)
    PseudoRET implicit $x10
...
---
name:            is_fpclass_f64
legalized:       true
body:             |
  bb.0:
    liveins: $f10_d

    ; CHECK-LABEL: name: is_fpclass_f64
    ; CHECK: liveins: $f10_d
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s64) = COPY $f10_d
    ; CHECK-NEXT: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 152
    ; CHECK-NEXT: [[C1:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 0
    ; CHECK-NEXT: [[FCLASS:%[0-9]+]]:gprb(s32) = G_FCLASS [[COPY]](s64)
    ; CHECK-NEXT: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[FCLASS]], [[C]]
    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:gprb(s32) = G_ICMP intpred(ne), [[AND]](s32), [[C1]]
    ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:_(s64) = COPY $f10_d
    %3:_(s32) = G_CONSTANT i32 152
    %4:_(s32) = G_CONSTANT i32 0
    %5:_(s32) = G_FCLASS %0(s64)
    %6:_(s32) = G_AND %5, %3
    %7:_(s32) = G_ICMP intpred(ne), %6(s32), %4
    $x10 = COPY %7(s32)
    PseudoRET implicit $x10
...