1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX8 %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX8 %s
11 liveins: $sgpr0, $sgpr1
12 ; GFX8-LABEL: name: icmp_eq_s16_ss
13 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
15 ; GFX8: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
16 ; GFX8: [[TRUNC1:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY1]](s32)
17 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[TRUNC]](s16), [[TRUNC1]]
18 %0:_(s32) = COPY $sgpr0
19 %1:_(s32) = COPY $sgpr1
20 %2:_(s16) = G_TRUNC %0
21 %3:_(s16) = G_TRUNC %1
22 %4:_(s1) = G_ICMP intpred(eq), %2, %3
31 liveins: $sgpr0, $vgpr0
32 ; GFX8-LABEL: name: icmp_eq_s16_sv
33 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
34 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
35 ; GFX8: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
36 ; GFX8: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
37 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[TRUNC]](s16), [[TRUNC1]]
38 %0:_(s32) = COPY $sgpr0
39 %1:_(s32) = COPY $vgpr0
40 %2:_(s16) = G_TRUNC %0
41 %3:_(s16) = G_TRUNC %1
42 %4:_(s1) = G_ICMP intpred(eq), %2, %3
51 liveins: $sgpr0, $vgpr0
52 ; GFX8-LABEL: name: icmp_eq_s16_vs
53 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
54 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
55 ; GFX8: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
56 ; GFX8: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
57 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[TRUNC]](s16), [[TRUNC1]]
58 %0:_(s32) = COPY $sgpr0
59 %1:_(s32) = COPY $vgpr0
60 %2:_(s16) = G_TRUNC %0
61 %3:_(s16) = G_TRUNC %1
62 %4:_(s1) = G_ICMP intpred(eq), %2, %3
71 liveins: $vgpr0, $vgpr1
72 ; GFX8-LABEL: name: icmp_eq_s16_vv
73 ; GFX8: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
74 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
75 ; GFX8: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
76 ; GFX8: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
77 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[TRUNC]](s16), [[TRUNC1]]
78 %0:_(s32) = COPY $vgpr0
79 %1:_(s32) = COPY $vgpr1
80 %2:_(s16) = G_TRUNC %0
81 %3:_(s16) = G_TRUNC %1
82 %4:_(s1) = G_ICMP intpred(eq), %2, %3