1 # RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=instruction-select -global-isel-abort=2 -pass-remarks-missed='gisel*' -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck -check-prefix=ERR %s
3 # Make sure v2s16 SALU operations fail to select
5 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_ADD %0:sgpr, %1:sgpr (in function: s_add_v2s16)
6 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_SUB %0:sgpr, %1:sgpr (in function: s_sub_v2s16)
7 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_MUL %0:sgpr, %1:sgpr (in function: s_mul_v2s16)
8 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_SHL %0:sgpr, %1:sgpr(<2 x s16>) (in function: s_shl_v2s16)
9 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_LSHR %0:sgpr, %1:sgpr(<2 x s16>) (in function: s_lshr_v2s16)
10 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_ASHR %0:sgpr, %1:sgpr(<2 x s16>) (in function: s_ashr_v2s16)
11 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_SMIN %0:sgpr, %1:sgpr (in function: s_smin_v2s16)
12 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_SMAX %0:sgpr, %1:sgpr (in function: s_smax_v2s16)
13 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_UMIN %0:sgpr, %1:sgpr (in function: s_umin_v2s16)
14 # ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_UMAX %0:sgpr, %1:sgpr (in function: s_umax_v2s16)
20 tracksRegLiveness: true
24 liveins: $sgpr0, $sgpr1
26 %0:sgpr(<2 x s16>) = COPY $sgpr0
27 %1:sgpr(<2 x s16>) = COPY $sgpr1
28 %2:sgpr(<2 x s16>) = G_ADD %0, %1
29 S_ENDPGM 0, implicit %2
37 tracksRegLiveness: true
41 liveins: $sgpr0, $sgpr1
43 %0:sgpr(<2 x s16>) = COPY $sgpr0
44 %1:sgpr(<2 x s16>) = COPY $sgpr1
45 %2:sgpr(<2 x s16>) = G_SUB %0, %1
46 S_ENDPGM 0, implicit %2
54 tracksRegLiveness: true
58 liveins: $sgpr0, $sgpr1
60 %0:sgpr(<2 x s16>) = COPY $sgpr0
61 %1:sgpr(<2 x s16>) = COPY $sgpr1
62 %2:sgpr(<2 x s16>) = G_MUL %0, %1
63 S_ENDPGM 0, implicit %2
71 tracksRegLiveness: true
75 liveins: $sgpr0, $sgpr1
77 %0:sgpr(<2 x s16>) = COPY $sgpr0
78 %1:sgpr(<2 x s16>) = COPY $sgpr1
79 %2:sgpr(<2 x s16>) = G_SHL %0, %1
80 S_ENDPGM 0, implicit %2
88 tracksRegLiveness: true
92 liveins: $sgpr0, $sgpr1
94 %0:sgpr(<2 x s16>) = COPY $sgpr0
95 %1:sgpr(<2 x s16>) = COPY $sgpr1
96 %2:sgpr(<2 x s16>) = G_LSHR %0, %1
97 S_ENDPGM 0, implicit %2
104 regBankSelected: true
105 tracksRegLiveness: true
109 liveins: $sgpr0, $sgpr1
111 %0:sgpr(<2 x s16>) = COPY $sgpr0
112 %1:sgpr(<2 x s16>) = COPY $sgpr1
113 %2:sgpr(<2 x s16>) = G_ASHR %0, %1
114 S_ENDPGM 0, implicit %2
121 regBankSelected: true
122 tracksRegLiveness: true
126 liveins: $sgpr0, $sgpr1
128 %0:sgpr(<2 x s16>) = COPY $sgpr0
129 %1:sgpr(<2 x s16>) = COPY $sgpr1
130 %2:sgpr(<2 x s16>) = G_SMIN %0, %1
131 S_ENDPGM 0, implicit %2
138 regBankSelected: true
139 tracksRegLiveness: true
143 liveins: $sgpr0, $sgpr1
145 %0:sgpr(<2 x s16>) = COPY $sgpr0
146 %1:sgpr(<2 x s16>) = COPY $sgpr1
147 %2:sgpr(<2 x s16>) = G_SMAX %0, %1
148 S_ENDPGM 0, implicit %2
155 regBankSelected: true
156 tracksRegLiveness: true
160 liveins: $sgpr0, $sgpr1
162 %0:sgpr(<2 x s16>) = COPY $sgpr0
163 %1:sgpr(<2 x s16>) = COPY $sgpr1
164 %2:sgpr(<2 x s16>) = G_UMIN %0, %1
165 S_ENDPGM 0, implicit %2
172 regBankSelected: true
173 tracksRegLiveness: true
177 liveins: $sgpr0, $sgpr1
179 %0:sgpr(<2 x s16>) = COPY $sgpr0
180 %1:sgpr(<2 x s16>) = COPY $sgpr1
181 %2:sgpr(<2 x s16>) = G_UMAX %0, %1
182 S_ENDPGM 0, implicit %2