• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# 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
3# RUN: FileCheck -check-prefixes=ERR-GFX910,ERR %s < %t
4
5# 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
6# RUN: FileCheck -check-prefixes=ERR-GFX910,ERR %s < %t
7
8# ERR-NOT: remark
9# 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)
10# ERR-NOT: remark
11
12---
13name: shl_v2s16_ss
14legalized: true
15regBankSelected: true
16
17body: |
18  bb.0:
19    liveins: $sgpr0, $sgpr1
20    ; GFX6-LABEL: name: shl_v2s16_ss
21    ; GFX6: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
22    ; GFX6: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
23    ; GFX6: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
24    ; GFX6: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
25    ; GFX7-LABEL: name: shl_v2s16_ss
26    ; GFX7: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
27    ; GFX7: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
28    ; GFX7: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
29    ; GFX7: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
30    ; GFX8-LABEL: name: shl_v2s16_ss
31    ; GFX8: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
32    ; GFX8: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
33    ; GFX8: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
34    ; GFX8: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
35    ; GFX9-LABEL: name: shl_v2s16_ss
36    ; GFX9: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
37    ; GFX9: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
38    ; GFX9: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
39    ; GFX9: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
40    ; GFX10-LABEL: name: shl_v2s16_ss
41    ; GFX10: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
42    ; GFX10: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
43    ; GFX10: [[SHL:%[0-9]+]]:sgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
44    ; GFX10: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
45    %0:sgpr(<2 x s16>) = COPY $sgpr0
46    %1:sgpr(<2 x s16>) = COPY $sgpr1
47    %2:sgpr(<2 x s16>) = G_SHL %0, %1
48    S_ENDPGM 0, implicit %2
49...
50
51---
52name: shl_v2s16_sv
53legalized: true
54regBankSelected: true
55
56body: |
57  bb.0:
58    liveins: $sgpr0, $vgpr0
59    ; GFX6-LABEL: name: shl_v2s16_sv
60    ; GFX6: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
61    ; GFX6: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
62    ; GFX6: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
63    ; GFX6: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
64    ; GFX7-LABEL: name: shl_v2s16_sv
65    ; GFX7: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
66    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
67    ; GFX7: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
68    ; GFX7: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
69    ; GFX8-LABEL: name: shl_v2s16_sv
70    ; GFX8: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
71    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
72    ; GFX8: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
73    ; GFX8: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
74    ; GFX9-LABEL: name: shl_v2s16_sv
75    ; GFX9: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
76    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
77    ; GFX9: [[V_PK_LSHLREV_B16_:%[0-9]+]]:vgpr_32 = V_PK_LSHLREV_B16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
78    ; GFX9: S_ENDPGM 0, implicit [[V_PK_LSHLREV_B16_]]
79    ; GFX10-LABEL: name: shl_v2s16_sv
80    ; GFX10: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
81    ; GFX10: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
82    ; GFX10: [[V_PK_LSHLREV_B16_:%[0-9]+]]:vgpr_32 = V_PK_LSHLREV_B16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
83    ; GFX10: S_ENDPGM 0, implicit [[V_PK_LSHLREV_B16_]]
84    %0:sgpr(<2 x s16>) = COPY $sgpr0
85    %1:vgpr(<2 x s16>) = COPY $vgpr0
86    %2:vgpr(<2 x s16>) = G_SHL %0, %1
87    S_ENDPGM 0, implicit %2
88...
89
90---
91name: shl_v2s16_vs
92legalized: true
93regBankSelected: true
94
95body: |
96  bb.0:
97    liveins: $sgpr0, $vgpr0
98    ; GFX6-LABEL: name: shl_v2s16_vs
99    ; GFX6: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
100    ; GFX6: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
101    ; GFX6: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
102    ; GFX6: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
103    ; GFX7-LABEL: name: shl_v2s16_vs
104    ; GFX7: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
105    ; GFX7: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
106    ; GFX7: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
107    ; GFX7: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
108    ; GFX8-LABEL: name: shl_v2s16_vs
109    ; GFX8: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
110    ; GFX8: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
111    ; GFX8: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
112    ; GFX8: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
113    ; GFX9-LABEL: name: shl_v2s16_vs
114    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
115    ; GFX9: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
116    ; GFX9: [[V_PK_LSHLREV_B16_:%[0-9]+]]:vgpr_32 = V_PK_LSHLREV_B16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
117    ; GFX9: S_ENDPGM 0, implicit [[V_PK_LSHLREV_B16_]]
118    ; GFX10-LABEL: name: shl_v2s16_vs
119    ; GFX10: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
120    ; GFX10: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
121    ; GFX10: [[V_PK_LSHLREV_B16_:%[0-9]+]]:vgpr_32 = V_PK_LSHLREV_B16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
122    ; GFX10: S_ENDPGM 0, implicit [[V_PK_LSHLREV_B16_]]
123    %0:vgpr(<2 x s16>) = COPY $vgpr0
124    %1:sgpr(<2 x s16>) = COPY $sgpr0
125    %2:vgpr(<2 x s16>) = G_SHL %0, %1
126    S_ENDPGM 0, implicit %2
127...
128
129---
130name: shl_v2s16_vv
131legalized: true
132regBankSelected: true
133
134body: |
135  bb.0:
136    liveins: $vgpr0, $vgpr1
137    ; GFX6-LABEL: name: shl_v2s16_vv
138    ; GFX6: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
139    ; GFX6: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
140    ; GFX6: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
141    ; GFX6: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
142    ; GFX7-LABEL: name: shl_v2s16_vv
143    ; GFX7: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
144    ; GFX7: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
145    ; GFX7: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
146    ; GFX7: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
147    ; GFX8-LABEL: name: shl_v2s16_vv
148    ; GFX8: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
149    ; GFX8: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
150    ; GFX8: [[SHL:%[0-9]+]]:vgpr(<2 x s16>) = G_SHL [[COPY]], [[COPY1]](<2 x s16>)
151    ; GFX8: S_ENDPGM 0, implicit [[SHL]](<2 x s16>)
152    ; GFX9-LABEL: name: shl_v2s16_vv
153    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
154    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
155    ; GFX9: [[V_PK_LSHLREV_B16_:%[0-9]+]]:vgpr_32 = V_PK_LSHLREV_B16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
156    ; GFX9: S_ENDPGM 0, implicit [[V_PK_LSHLREV_B16_]]
157    ; GFX10-LABEL: name: shl_v2s16_vv
158    ; GFX10: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
159    ; GFX10: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
160    ; GFX10: [[V_PK_LSHLREV_B16_:%[0-9]+]]:vgpr_32 = V_PK_LSHLREV_B16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
161    ; GFX10: S_ENDPGM 0, implicit [[V_PK_LSHLREV_B16_]]
162    %0:vgpr(<2 x s16>) = COPY $vgpr0
163    %1:vgpr(<2 x s16>) = COPY $vgpr1
164    %2:vgpr(<2 x s16>) = G_SHL %0, %1
165    S_ENDPGM 0, implicit %2
166...
167