llvm/llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/icmp-rv32.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=riscv32 -run-pass=instruction-select -simplify-mir \
# RUN: -verify-machineinstrs %s -o - | FileCheck %s
---
name:            cmp_ult_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_ult_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY]], [[COPY1]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(ult), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_slt_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_slt_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY]], [[COPY1]]
    ; CHECK-NEXT: $x10 = COPY [[SLT]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(slt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ugt_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_ugt_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY1]], [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sgt_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_sgt_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY1]], [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLT]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(sgt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_eq_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_eq_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:gpr = XOR [[COPY]], [[COPY1]]
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[XOR]], 1
    ; CHECK-NEXT: $x10 = COPY [[SLTIU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ne_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_ne_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:gpr = XOR [[COPY]], [[COPY1]]
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU $x0, [[XOR]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ule_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_ule_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY1]], [[COPY]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTU]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(ule), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sle_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_sle_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY1]], [[COPY]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLT]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(sle), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_uge_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_uge_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY]], [[COPY1]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTU]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(uge), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sge_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_sge_i32
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY]], [[COPY1]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLT]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(sge), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ult_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_ult_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY]], [[COPY1]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(ult), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_slt_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_slt_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY]], [[COPY1]]
    ; CHECK-NEXT: $x10 = COPY [[SLT]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(slt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ugt_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_ugt_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY1]], [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sgt_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_sgt_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY1]], [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLT]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(sgt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_eq_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_eq_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:gpr = XOR [[COPY]], [[COPY1]]
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[XOR]], 1
    ; CHECK-NEXT: $x10 = COPY [[SLTIU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ne_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_ne_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:gpr = XOR [[COPY]], [[COPY1]]
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU $x0, [[XOR]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ule_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_ule_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY1]], [[COPY]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTU]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(ule), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sle_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_sle_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY1]], [[COPY]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLT]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(sle), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_uge_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_uge_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY]], [[COPY1]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTU]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(uge), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sge_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11

    ; CHECK-LABEL: name: cmp_sge_p0
    ; CHECK: liveins: $x10, $x11
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY]], [[COPY1]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLT]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = COPY $x11
    %2:gprb(s32) = G_ICMP intpred(sge), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ulti_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ulti_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[COPY]], 10
    ; CHECK-NEXT: $x10 = COPY [[SLTIU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(ult), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_slti_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_slti_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTI:%[0-9]+]]:gpr = SLTI [[COPY]], -10
    ; CHECK-NEXT: $x10 = COPY [[SLTI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(slt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ugti_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ugti_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[COPY]], 11
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTIU]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sgti_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_sgti_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTI:%[0-9]+]]:gpr = SLTI [[COPY]], -9
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTI]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(sgt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_eqi_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_eqi_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI [[COPY]], -10
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[ADDI]], 1
    ; CHECK-NEXT: $x10 = COPY [[SLTIU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_nei_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_nei_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI [[COPY]], 10
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU $x0, [[ADDI]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ulei_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ulei_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[COPY]], 11
    ; CHECK-NEXT: $x10 = COPY [[SLTIU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(ule), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_slei_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_slei_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTI:%[0-9]+]]:gpr = SLTI [[COPY]], -9
    ; CHECK-NEXT: $x10 = COPY [[SLTI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(sle), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ugei_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ugei_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[COPY]], 10
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTIU]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(uge), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sgei_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_sgei_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTI:%[0-9]+]]:gpr = SLTI [[COPY]], -10
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTI]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(sge), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ulti_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ulti_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, 10
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY]], [[ADDI]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(ult), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_slti_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_slti_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, -10
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY]], [[ADDI]]
    ; CHECK-NEXT: $x10 = COPY [[SLT]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(slt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ugti_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ugti_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, 10
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[ADDI]], [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sgti_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_sgti_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, -10
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[ADDI]], [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLT]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(sgt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_eqi_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_eqi_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, 10
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:gpr = XOR [[COPY]], [[ADDI]]
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[XOR]], 1
    ; CHECK-NEXT: $x10 = COPY [[SLTIU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_nei_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_nei_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, -10
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:gpr = XOR [[COPY]], [[ADDI]]
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU $x0, [[XOR]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ulei_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ulei_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, 10
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[ADDI]], [[COPY]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTU]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(ule), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_slei_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_slei_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, -10
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[ADDI]], [[COPY]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLT]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(sle), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ugei_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ugei_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, 10
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY]], [[ADDI]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLTU]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 10
    %2:gprb(s32) = G_ICMP intpred(uge), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_sgei_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_sgei_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, -10
    ; CHECK-NEXT: [[SLT:%[0-9]+]]:gpr = SLT [[COPY]], [[ADDI]]
    ; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[SLT]], 1
    ; CHECK-NEXT: $x10 = COPY [[XORI]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 -10
    %2:gprb(s32) = G_ICMP intpred(sge), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_eq0_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_eq0_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[COPY]], 1
    ; CHECK-NEXT: $x10 = COPY [[SLTIU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 0
    %2:gprb(s32) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_eq0_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_eq0_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTIU:%[0-9]+]]:gpr = SLTIU [[COPY]], 1
    ; CHECK-NEXT: $x10 = COPY [[SLTIU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 0
    %2:gprb(s32) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ne0_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ne0_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU $x0, [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 0
    %2:gprb(s32) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ne0_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ne0_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU $x0, [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 0
    %2:gprb(s32) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ugt_neg1_i32
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ugt_neg1_i32
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, -1
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[ADDI]], [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(s32) = COPY $x10
    %1:gprb(s32) = G_CONSTANT i32 -1
    %2:gprb(s32) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...
---
name:            cmp_ugt_neg1_p0
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; CHECK-LABEL: name: cmp_ugt_neg1_p0
    ; CHECK: liveins: $x10
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, -1
    ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[ADDI]], [[COPY]]
    ; CHECK-NEXT: $x10 = COPY [[SLTU]]
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:gprb(p0) = COPY $x10
    %1:gprb(p0) = G_CONSTANT i32 -1
    %2:gprb(s32) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s32)
    PseudoRET implicit $x10

...