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

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

    ; CHECK-LABEL: name: cmp_ult_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(ult), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_slt_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(slt), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_ugt_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_sgt_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(sgt), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_eq_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_ne_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_ule_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(ule), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_sle_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(sle), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_uge_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(uge), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_sge_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = COPY $x11
    %2:gprb(s64) = G_ICMP intpred(sge), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(ult), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(slt), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(sgt), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(ule), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(sle), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(uge), %0, %1
    $x10 = COPY %2(s64)
    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(s64) = G_ICMP intpred(sge), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_ulti_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 10
    %2:gprb(s64) = G_ICMP intpred(ult), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_slti_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 -10
    %2:gprb(s64) = G_ICMP intpred(slt), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_ugti_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 10
    %2:gprb(s64) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_sgti_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 -10
    %2:gprb(s64) = G_ICMP intpred(sgt), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_eqi_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 10
    %2:gprb(s64) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_nei_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 -10
    %2:gprb(s64) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_ulei_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 10
    %2:gprb(s64) = G_ICMP intpred(ule), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_slei_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 -10
    %2:gprb(s64) = G_ICMP intpred(sle), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_ugei_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 10
    %2:gprb(s64) = G_ICMP intpred(uge), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_sgei_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 -10
    %2:gprb(s64) = G_ICMP intpred(sge), %0, %1
    $x10 = COPY %2(s64)
    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 i64 10
    %2:gprb(s64) = G_ICMP intpred(ult), %0, %1
    $x10 = COPY %2(s64)
    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 i64 -10
    %2:gprb(s64) = G_ICMP intpred(slt), %0, %1
    $x10 = COPY %2(s64)
    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 i64 10
    %2:gprb(s64) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s64)
    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 i64 -10
    %2:gprb(s64) = G_ICMP intpred(sgt), %0, %1
    $x10 = COPY %2(s64)
    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 i64 10
    %2:gprb(s64) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s64)
    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 i64 -10
    %2:gprb(s64) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s64)
    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 i64 10
    %2:gprb(s64) = G_ICMP intpred(ule), %0, %1
    $x10 = COPY %2(s64)
    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 i64 -10
    %2:gprb(s64) = G_ICMP intpred(sle), %0, %1
    $x10 = COPY %2(s64)
    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 i64 10
    %2:gprb(s64) = G_ICMP intpred(uge), %0, %1
    $x10 = COPY %2(s64)
    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 i64 -10
    %2:gprb(s64) = G_ICMP intpred(sge), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_eq0_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 0
    %2:gprb(s64) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s64)
    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 i64 0
    %2:gprb(s64) = G_ICMP intpred(eq), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_ne0_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 0
    %2:gprb(s64) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s64)
    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 i64 0
    %2:gprb(s64) = G_ICMP intpred(ne), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

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

    ; CHECK-LABEL: name: cmp_ugt_neg1_i64
    ; 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(s64) = COPY $x10
    %1:gprb(s64) = G_CONSTANT i64 -1
    %2:gprb(s64) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s64)
    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 i64 -1
    %2:gprb(s64) = G_ICMP intpred(ugt), %0, %1
    $x10 = COPY %2(s64)
    PseudoRET implicit $x10

...