1 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -global-isel-abort=2 -pass-remarks-missed='gisel*' -verify-machineinstrs %s -o - 2>%t | FileCheck -check-prefix=GFX9 %s
2 # RUN: FileCheck -check-prefixes=ERR-GFX910,ERR %s < %t
4 # RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -global-isel-abort=2 -pass-remarks-missed='gisel*' -verify-machineinstrs %s -o - 2>%t | FileCheck -check-prefix=GFX10 %s
5 # RUN: FileCheck -check-prefixes=ERR-GFX910,ERR %s < %t
8 # ERR-GFX910: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_SHL %0:sgpr, %1:sgpr(<2 x s16>) (in function: shl_v2s16_ss)
9 # ERR-GFX910-NEXT: remark: <unknown>:0:0: cannot select: %2:vgpr(<2 x s16>) = G_SHL %0:sgpr, %1:vgpr(<2 x s16>) (in function: shl_v2s16_sv)
10 # ERR-GFX910-NEXT: remark: <unknown>:0:0: cannot select: %2:vgpr(<2 x s16>) = G_SHL %0:vgpr, %1:sgpr(<2 x s16>) (in function: shl_v2s16_vs)
11 # ERR-GFX910-NEXT: remark: <unknown>:0:0: cannot select: %2:vgpr(<2 x s16>) = G_SHL %0:vgpr, %1:vgpr(<2 x s16>) (in function: shl_v2s16_vv)
21 liveins: $sgpr0, $sgpr1
22 ; GFX6-LABEL: name: shl_v2s16_ss
23 ; GFX6: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
24 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
25 ; GFX6: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
26 ; GFX6: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
27 ; GFX7-LABEL: name: shl_v2s16_ss
28 ; GFX7: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
29 ; GFX7: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
30 ; GFX7: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
31 ; GFX7: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
32 ; GFX8-LABEL: name: shl_v2s16_ss
33 ; GFX8: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
34 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
35 ; GFX8: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
36 ; GFX8: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
37 ; GFX9-LABEL: name: shl_v2s16_ss
38 ; GFX9: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
39 ; GFX9: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
40 ; GFX9: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
41 ; GFX9: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
42 ; GFX10-LABEL: name: shl_v2s16_ss
43 ; GFX10: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
44 ; GFX10: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
45 ; GFX10: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
46 ; GFX10: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
47 %0:sgpr(<2 x s16>) = COPY $sgpr0
48 %1:sgpr(<2 x s16>) = COPY $sgpr1
49 %2:sgpr(<2 x s16>) = G_SHL %0, %1
50 S_ENDPGM 0, implicit %2
60 liveins: $sgpr0, $vgpr0
61 ; GFX6-LABEL: name: shl_v2s16_sv
62 ; GFX6: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
63 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
64 ; GFX6: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
65 ; GFX6: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
66 ; GFX7-LABEL: name: shl_v2s16_sv
67 ; GFX7: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
68 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
69 ; GFX7: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
70 ; GFX7: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
71 ; GFX8-LABEL: name: shl_v2s16_sv
72 ; GFX8: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
73 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
74 ; GFX8: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
75 ; GFX8: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
76 ; GFX9-LABEL: name: shl_v2s16_sv
77 ; GFX9: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
78 ; GFX9: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
79 ; GFX9: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
80 ; GFX9: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
81 ; GFX10-LABEL: name: shl_v2s16_sv
82 ; GFX10: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
83 ; GFX10: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
84 ; GFX10: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
85 ; GFX10: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
86 %0:sgpr(<2 x s16>) = COPY $sgpr0
87 %1:vgpr(<2 x s16>) = COPY $vgpr0
88 %2:vgpr(<2 x s16>) = G_SHL %0, %1
89 S_ENDPGM 0, implicit %2
99 liveins: $sgpr0, $vgpr0
100 ; GFX6-LABEL: name: shl_v2s16_vs
101 ; GFX6: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
102 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
103 ; GFX6: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
104 ; GFX6: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
105 ; GFX7-LABEL: name: shl_v2s16_vs
106 ; GFX7: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
107 ; GFX7: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
108 ; GFX7: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
109 ; GFX7: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
110 ; GFX8-LABEL: name: shl_v2s16_vs
111 ; GFX8: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
112 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
113 ; GFX8: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
114 ; GFX8: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
115 ; GFX9-LABEL: name: shl_v2s16_vs
116 ; GFX9: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
117 ; GFX9: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
118 ; GFX9: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
119 ; GFX9: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
120 ; GFX10-LABEL: name: shl_v2s16_vs
121 ; GFX10: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
122 ; GFX10: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
123 ; GFX10: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
124 ; GFX10: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
125 %0:vgpr(<2 x s16>) = COPY $vgpr0
126 %1:sgpr(<2 x s16>) = COPY $sgpr0
127 %2:vgpr(<2 x s16>) = G_SHL %0, %1
128 S_ENDPGM 0, implicit %2
134 regBankSelected: true
138 liveins: $vgpr0, $vgpr1
139 ; GFX6-LABEL: name: shl_v2s16_vv
140 ; GFX6: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
141 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
142 ; GFX6: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
143 ; GFX6: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
144 ; GFX7-LABEL: name: shl_v2s16_vv
145 ; GFX7: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
146 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
147 ; GFX7: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
148 ; GFX7: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
149 ; GFX8-LABEL: name: shl_v2s16_vv
150 ; GFX8: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
151 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
152 ; GFX8: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
153 ; GFX8: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
154 ; GFX9-LABEL: name: shl_v2s16_vv
155 ; GFX9: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
156 ; GFX9: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
157 ; GFX9: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
158 ; GFX9: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
159 ; GFX10-LABEL: name: shl_v2s16_vv
160 ; GFX10: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
161 ; GFX10: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
162 ; GFX10: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
163 ; GFX10: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
164 %0:vgpr(<2 x s16>) = COPY $vgpr0
165 %1:vgpr(<2 x s16>) = COPY $vgpr1
166 %2:vgpr(<2 x s16>) = G_SHL %0, %1
167 S_ENDPGM 0, implicit %2