1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX8 %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=amdgpu-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: liveins: $sgpr0, $sgpr1
15 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
16 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
17 ; GFX8-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
18 ; GFX8-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY1]](s32)
19 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr(s16) = COPY [[TRUNC]](s16)
20 ; GFX8-NEXT: [[COPY3:%[0-9]+]]:vgpr(s16) = COPY [[TRUNC1]](s16)
21 ; GFX8-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s16), [[COPY3]]
22 %0:_(s32) = COPY $sgpr0
23 %1:_(s32) = COPY $sgpr1
24 %2:_(s16) = G_TRUNC %0
25 %3:_(s16) = G_TRUNC %1
26 %4:_(s1) = G_ICMP intpred(eq), %2, %3
35 liveins: $sgpr0, $vgpr0
36 ; GFX8-LABEL: name: icmp_eq_s16_sv
37 ; GFX8: liveins: $sgpr0, $vgpr0
39 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
40 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
41 ; GFX8-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
42 ; GFX8-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
43 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr(s16) = COPY [[TRUNC]](s16)
44 ; GFX8-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s16), [[TRUNC1]]
45 %0:_(s32) = COPY $sgpr0
46 %1:_(s32) = COPY $vgpr0
47 %2:_(s16) = G_TRUNC %0
48 %3:_(s16) = G_TRUNC %1
49 %4:_(s1) = G_ICMP intpred(eq), %2, %3
58 liveins: $sgpr0, $vgpr0
59 ; GFX8-LABEL: name: icmp_eq_s16_vs
60 ; GFX8: liveins: $sgpr0, $vgpr0
62 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
63 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
64 ; GFX8-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
65 ; GFX8-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
66 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr(s16) = COPY [[TRUNC]](s16)
67 ; GFX8-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s16), [[TRUNC1]]
68 %0:_(s32) = COPY $sgpr0
69 %1:_(s32) = COPY $vgpr0
70 %2:_(s16) = G_TRUNC %0
71 %3:_(s16) = G_TRUNC %1
72 %4:_(s1) = G_ICMP intpred(eq), %2, %3
81 liveins: $vgpr0, $vgpr1
82 ; GFX8-LABEL: name: icmp_eq_s16_vv
83 ; GFX8: liveins: $vgpr0, $vgpr1
85 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
86 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
87 ; GFX8-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
88 ; GFX8-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
89 ; GFX8-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[TRUNC]](s16), [[TRUNC1]]
90 %0:_(s32) = COPY $vgpr0
91 %1:_(s32) = COPY $vgpr1
92 %2:_(s16) = G_TRUNC %0
93 %3:_(s16) = G_TRUNC %1
94 %4:_(s1) = G_ICMP intpred(eq), %2, %3