regbankselect-icmp.mir 11.6 KB
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX7 %s
# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX8 %s
# RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX7 %s
# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX8 %s

---
name: icmp_eq_s32_ss
legalized: true

body: |
  bb.0:
    liveins: $sgpr0, $sgpr1
    ; GFX7-LABEL: name: icmp_eq_s32_ss
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
    ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
    ; GFX7: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
    ; GFX7: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
    ; GFX8-LABEL: name: icmp_eq_s32_ss
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
    ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
    ; GFX8: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
    ; GFX8: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
    %0:_(s32) = COPY $sgpr0
    %1:_(s32) = COPY $sgpr1
    %2:_(s1) = G_ICMP intpred(eq), %0, %1
...

---
name: icmp_eq_s32_sv
legalized: true

body: |
  bb.0:
    liveins: $sgpr0, $vgpr0
    ; GFX7-LABEL: name: icmp_eq_s32_sv
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
    ; GFX8-LABEL: name: icmp_eq_s32_sv
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
    %0:_(s32) = COPY $sgpr0
    %1:_(s32) = COPY $vgpr0
    %2:_(s1) = G_ICMP intpred(eq), %0, %1
...

---
name: icmp_eq_s32_vs
legalized: true

body: |
  bb.0:
    liveins: $sgpr0, $vgpr0
    ; GFX7-LABEL: name: icmp_eq_s32_vs
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY]]
    ; GFX8-LABEL: name: icmp_eq_s32_vs
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY]]
    %0:_(s32) = COPY $sgpr0
    %1:_(s32) = COPY $vgpr0
    %2:_(s1) = G_ICMP intpred(eq), %1, %0
...

---
name: icmp_eq_s32_vv
legalized: true

body: |
  bb.0:
    liveins: $vgpr0, $vgpr1
    ; GFX7-LABEL: name: icmp_eq_s32_vv
    ; GFX7: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
    ; GFX8-LABEL: name: icmp_eq_s32_vv
    ; GFX8: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
    %0:_(s32) = COPY $vgpr0
    %1:_(s32) = COPY $vgpr1
    %2:_(s1) = G_ICMP intpred(eq), %0, %1
...

---
name: icmp_eq_s64_ss
legalized: true

body: |
  bb.0:
    liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX7-LABEL: name: icmp_eq_s64_ss
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
    ; GFX8-LABEL: name: icmp_eq_s64_ss
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX8: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
    ; GFX8: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
    %0:_(s64) = COPY $sgpr0_sgpr1
    %1:_(s64) = COPY $sgpr2_sgpr3
    %2:_(s1) = G_ICMP intpred(eq), %0, %1
...

---
name: icmp_eq_s64_sv
legalized: true

body: |
  bb.0:
    liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
    ; GFX7-LABEL: name: icmp_eq_s64_sv
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
    ; GFX8-LABEL: name: icmp_eq_s64_sv
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
    %0:_(s64) = COPY $sgpr0_sgpr1
    %1:_(s64) = COPY $vgpr0_vgpr1
    %2:_(s1) = G_ICMP intpred(eq), %0, %1
...

---
name: icmp_eq_s64_vs
legalized: true

body: |
  bb.0:
    liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
    ; GFX7-LABEL: name: icmp_eq_s64_vs
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s64), [[COPY]]
    ; GFX8-LABEL: name: icmp_eq_s64_vs
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s64), [[COPY]]
    %0:_(s64) = COPY $sgpr0_sgpr1
    %1:_(s64) = COPY $vgpr0_vgpr1
    %2:_(s1) = G_ICMP intpred(eq), %1, %0
...

---
name: icmp_eq_s64_vv
legalized: true

body: |
  bb.0:
    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX7-LABEL: name: icmp_eq_s64_vv
    ; GFX7: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
    ; GFX8-LABEL: name: icmp_eq_s64_vv
    ; GFX8: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
    %0:_(s64) = COPY $vgpr0_vgpr1
    %1:_(s64) = COPY $vgpr2_vgpr3
    %2:_(s1) = G_ICMP intpred(eq), %0, %1
...

---
name: icmp_ne_s64_ss
legalized: true

body: |
  bb.0:
    liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX7-LABEL: name: icmp_ne_s64_ss
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
    ; GFX8-LABEL: name: icmp_ne_s64_ss
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX8: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
    ; GFX8: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
    %0:_(s64) = COPY $sgpr0_sgpr1
    %1:_(s64) = COPY $sgpr2_sgpr3
    %2:_(s1) = G_ICMP intpred(ne), %0, %1
...

---
name: icmp_ne_s64_sv
legalized: true

body: |
  bb.0:
    liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
    ; GFX7-LABEL: name: icmp_ne_s64_sv
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
    ; GFX8-LABEL: name: icmp_ne_s64_sv
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
    %0:_(s64) = COPY $sgpr0_sgpr1
    %1:_(s64) = COPY $vgpr0_vgpr1
    %2:_(s1) = G_ICMP intpred(ne), %0, %1
...

---
name: icmp_ne_s64_vs
legalized: true

body: |
  bb.0:
    liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
    ; GFX7-LABEL: name: icmp_ne_s64_vs
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY1]](s64), [[COPY]]
    ; GFX8-LABEL: name: icmp_ne_s64_vs
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY1]](s64), [[COPY]]
    %0:_(s64) = COPY $sgpr0_sgpr1
    %1:_(s64) = COPY $vgpr0_vgpr1
    %2:_(s1) = G_ICMP intpred(ne), %1, %0
...

---
name: icmp_ne_s64_vv
legalized: true

body: |
  bb.0:
    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX7-LABEL: name: icmp_ne_s64_vv
    ; GFX7: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
    ; GFX8-LABEL: name: icmp_ne_s64_vv
    ; GFX8: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
    %0:_(s64) = COPY $vgpr0_vgpr1
    %1:_(s64) = COPY $vgpr2_vgpr3
    %2:_(s1) = G_ICMP intpred(ne), %0, %1
...

---
name: icmp_slt_s64_ss
legalized: true

body: |
  bb.0:
    liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
    ; GFX7-LABEL: name: icmp_slt_s64_ss
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
    ; GFX8-LABEL: name: icmp_slt_s64_ss
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
    %0:_(s64) = COPY $sgpr0_sgpr1
    %1:_(s64) = COPY $sgpr2_sgpr3
    %2:_(s1) = G_ICMP intpred(slt), %0, %1
...

---
name: icmp_slt_s64_sv
legalized: true

body: |
  bb.0:
    liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
    ; GFX7-LABEL: name: icmp_slt_s64_sv
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
    ; GFX8-LABEL: name: icmp_slt_s64_sv
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
    %0:_(s64) = COPY $sgpr0_sgpr1
    %1:_(s64) = COPY $vgpr0_vgpr1
    %2:_(s1) = G_ICMP intpred(slt), %0, %1
...

---
name: icmp_slt_s64_vs
legalized: true

body: |
  bb.0:
    liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
    ; GFX7-LABEL: name: icmp_slt_s64_vs
    ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY1]](s64), [[COPY]]
    ; GFX8-LABEL: name: icmp_slt_s64_vs
    ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY1]](s64), [[COPY]]
    %0:_(s64) = COPY $sgpr0_sgpr1
    %1:_(s64) = COPY $vgpr0_vgpr1
    %2:_(s1) = G_ICMP intpred(slt), %1, %0
...

---
name: icmp_slt_s64_vv
legalized: true

body: |
  bb.0:
    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
    ; GFX7-LABEL: name: icmp_slt_s64_vv
    ; GFX7: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
    ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
    ; GFX8-LABEL: name: icmp_slt_s64_vv
    ; GFX8: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
    ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
    %0:_(s64) = COPY $vgpr0_vgpr1
    %1:_(s64) = COPY $vgpr2_vgpr3
    %2:_(s1) = G_ICMP intpred(slt), %0, %1
...