llvm/llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-icmp.s64.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -pass-remarks-missed='gisel*' -global-isel-abort=2 -o - %s 2> %t | FileCheck -check-prefix=GFX8  %s
# RUN: FileCheck -check-prefixes=ERR,GFX8-ERR %s < %t

# RUN: llc -mtriple=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=2 -pass-remarks-missed='gisel*'  -o - %s 2> %t | FileCheck -check-prefix=GFX6  %s
# RUN: FileCheck -check-prefixes=ERR,GFX6-ERR %s < %t


# ERR-NOT: remark

# GFX6-ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(s64), %1:sgpr (in function: icmp_eq_s64_ss)
# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(ne), %0:sgpr(s64), %1:sgpr (in function: icmp_ne_s64_ss)
# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(slt), %0:sgpr(s64), %1:sgpr (in function: icmp_slt_s64_ss)
# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(p0), %1:sgpr (in function: icmp_eq_p0_ss)
# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(p1), %1:sgpr (in function: icmp_eq_p1_ss)
# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(p999), %1:sgpr (in function: icmp_eq_p999_ss)

# GFX8-ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(slt), %0:sgpr(s64), %1:sgpr (in function: icmp_slt_s64_ss)

# ERR-NOT: remark

---
name:            icmp_eq_s64_ss
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $sgpr0_sgpr1, $sgpr2_sgpr3

    ; GFX8-LABEL: name: icmp_eq_s64_ss
    ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
    ; GFX8-NEXT: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
    ; GFX6-LABEL: name: icmp_eq_s64_ss
    ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
    %0:sgpr(s64) = COPY $sgpr0_sgpr1
    %1:sgpr(s64) = COPY $sgpr2_sgpr3
    %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1
    S_ENDPGM 0, implicit %2

...

---
name:            icmp_ne_s64_ss
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $sgpr0_sgpr1, $sgpr2_sgpr3

    ; GFX8-LABEL: name: icmp_ne_s64_ss
    ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
    ; GFX8-NEXT: S_CMP_LG_U64 [[COPY]], [[COPY1]], implicit-def $scc
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
    ; GFX6-LABEL: name: icmp_ne_s64_ss
    ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
    %0:sgpr(s64) = COPY $sgpr0_sgpr1
    %1:sgpr(s64) = COPY $sgpr2_sgpr3
    %2:sgpr(s32) = G_ICMP intpred(ne), %0, %1
    S_ENDPGM 0, implicit %2

...

---
name:            icmp_slt_s64_ss
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $sgpr0_sgpr1, $sgpr2_sgpr3

    ; GFX8-LABEL: name: icmp_slt_s64_ss
    ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX8-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
    ; GFX6-LABEL: name: icmp_slt_s64_ss
    ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
    %0:sgpr(s64) = COPY $sgpr0_sgpr1
    %1:sgpr(s64) = COPY $sgpr2_sgpr3
    %2:sgpr(s32) = G_ICMP intpred(slt), %0, %1
    S_ENDPGM 0, implicit %2

...

---
name:            icmp_eq_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_eq_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_eq_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(eq), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_ne_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_ne_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_NE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_NE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_NE_U64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_ne_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_NE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_NE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_NE_U64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(ne), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_sgt_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_sgt_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_GT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_I64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_I64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_sgt_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_GT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_I64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_I64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(sgt), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_sge_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_sge_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_GE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_I64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_I64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_sge_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_GE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_I64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_I64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(sge), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_slt_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_slt_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_LT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_I64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_I64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_slt_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_LT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_I64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_I64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(slt), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_sle_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_sle_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_LE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_I64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_I64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_sle_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_LE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_I64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_I64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(sle), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_ugt_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_ugt_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_GT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_U64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_ugt_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_GT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_U64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(ugt), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_uge_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_uge_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_GE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_U64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_uge_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_GE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_U64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(uge), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_ult_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_ult_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_LT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_U64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_ult_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_LT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_U64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(ult), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_ule_s64_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_ule_s64_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_LE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_U64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_ule_s64_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_LE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_U64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(s64) = COPY $vgpr0_vgpr1
    %1:vgpr(s64) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(ule), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_eq_p0_ss
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $sgpr0_sgpr1, $sgpr2_sgpr3

    ; GFX8-LABEL: name: icmp_eq_p0_ss
    ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
    ; GFX8-NEXT: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
    ; GFX6-LABEL: name: icmp_eq_p0_ss
    ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p0) = COPY $sgpr0_sgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(p0) = COPY $sgpr2_sgpr3
    ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](p0), [[COPY1]]
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
    %0:sgpr(p0) = COPY $sgpr0_sgpr1
    %1:sgpr(p0) = COPY $sgpr2_sgpr3
    %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1
    S_ENDPGM 0, implicit %2
...

---
name:            icmp_eq_p1_ss
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $sgpr0_sgpr1, $sgpr2_sgpr3

    ; GFX8-LABEL: name: icmp_eq_p1_ss
    ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
    ; GFX8-NEXT: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
    ; GFX6-LABEL: name: icmp_eq_p1_ss
    ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(p1) = COPY $sgpr2_sgpr3
    ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](p1), [[COPY1]]
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
    %0:sgpr(p1) = COPY $sgpr0_sgpr1
    %1:sgpr(p1) = COPY $sgpr2_sgpr3
    %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1
    S_ENDPGM 0, implicit %2

...

---
name:            icmp_eq_p999_ss
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $sgpr0_sgpr1, $sgpr2_sgpr3

    ; GFX8-LABEL: name: icmp_eq_p999_ss
    ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
    ; GFX8-NEXT: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
    ; GFX6-LABEL: name: icmp_eq_p999_ss
    ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p999) = COPY $sgpr0_sgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(p999) = COPY $sgpr2_sgpr3
    ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](p999), [[COPY1]]
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
    %0:sgpr(p999) = COPY $sgpr0_sgpr1
    %1:sgpr(p999) = COPY $sgpr2_sgpr3
    %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1
    S_ENDPGM 0, implicit %2

...

---
name:            icmp_eq_p0_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_eq_p0_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_eq_p0_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(p0) = COPY $vgpr0_vgpr1
    %1:vgpr(p0) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(eq), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_eq_p1_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_eq_p1_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_eq_p1_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(p1) = COPY $vgpr0_vgpr1
    %1:vgpr(p1) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(eq), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...

---
name:            icmp_eq_p999_vv
legalized:       true
regBankSelected: true

body: |
  bb.0:
    liveins:  $vgpr0_vgpr1, $vgpr2_vgpr3

    ; GFX8-LABEL: name: icmp_eq_p999_vv
    ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX8-NEXT: {{  $}}
    ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX8-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
    ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    ; GFX6-LABEL: name: icmp_eq_p999_vv
    ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX6-NEXT: {{  $}}
    ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
    ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
    ; GFX6-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
    ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
    ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
    ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
    %0:vgpr(p999) = COPY $vgpr0_vgpr1
    %1:vgpr(p999) = COPY $vgpr2_vgpr3
    %2:vcc(s1) = G_ICMP intpred(eq), %0, %1
    %3:vgpr(s1) = COPY %2
    %4:vgpr(s32) = G_ZEXT %3
    S_ENDPGM 0, implicit %4

...