• 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=tahiti -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=MOVREL %s
3# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=MOVREL %s
4# RUN: llc -march=amdgcn -mcpu=fiji -amdgpu-vgpr-index-mode  -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GPRIDX %s
5# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GPRIDX %s
6
7---
8name: extract_vector_elt_s_s32_v2s32
9legalized: true
10regBankSelected: true
11
12body: |
13  bb.0:
14    liveins: $sgpr0_sgpr1, $sgpr2
15
16    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v2s32
17    ; MOVREL: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
18    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
19    ; MOVREL: $m0 = COPY [[COPY1]]
20    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
21    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
22    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v2s32
23    ; GPRIDX: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
24    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
25    ; GPRIDX: $m0 = COPY [[COPY1]]
26    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
27    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
28    %0:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
29    %1:sgpr(s32) = COPY $sgpr2
30    %2:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
31    S_ENDPGM 0, implicit %2
32...
33
34---
35name: extract_vector_elt_s_s32_v3s32
36legalized: true
37regBankSelected: true
38
39body: |
40  bb.0:
41    liveins: $sgpr0_sgpr1_sgpr2, $sgpr3
42
43    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v3s32
44    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_96 = COPY $sgpr0_sgpr1_sgpr2
45    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
46    ; MOVREL: $m0 = COPY [[COPY1]]
47    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
48    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
49    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v3s32
50    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_96 = COPY $sgpr0_sgpr1_sgpr2
51    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
52    ; GPRIDX: $m0 = COPY [[COPY1]]
53    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
54    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
55    %0:sgpr(<3 x s32>) = COPY $sgpr0_sgpr1_sgpr2
56    %1:sgpr(s32) = COPY $sgpr2
57    %2:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
58    S_ENDPGM 0, implicit %2
59...
60
61---
62name: extract_vector_elt_s_s32_v4s32
63legalized: true
64regBankSelected: true
65
66body: |
67  bb.0:
68    liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4
69
70    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v4s32
71    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
72    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr4
73    ; MOVREL: $m0 = COPY [[COPY1]]
74    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
75    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
76    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v4s32
77    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
78    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr4
79    ; GPRIDX: $m0 = COPY [[COPY1]]
80    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
81    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
82    %0:sgpr(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
83    %1:sgpr(s32) = COPY $sgpr4
84    %2:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
85    S_ENDPGM 0, implicit %2
86...
87
88---
89name: extract_vector_elt_s_s32_v8s32
90legalized: true
91regBankSelected: true
92
93body: |
94  bb.0:
95    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8
96
97    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v8s32
98    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
99    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
100    ; MOVREL: $m0 = COPY [[COPY1]]
101    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
102    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
103    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v8s32
104    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
105    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
106    ; GPRIDX: $m0 = COPY [[COPY1]]
107    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
108    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
109    %0:sgpr(<8 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
110    %1:sgpr(s32) = COPY $sgpr8
111    %2:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
112    S_ENDPGM 0, implicit %2
113...
114
115---
116name: extract_vector_elt_s_s32_v16s32
117legalized: true
118regBankSelected: true
119
120body: |
121  bb.0:
122    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
123
124    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v16s32
125    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
126    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
127    ; MOVREL: $m0 = COPY [[COPY1]]
128    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
129    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
130    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v16s32
131    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
132    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
133    ; GPRIDX: $m0 = COPY [[COPY1]]
134    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
135    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
136    %0:sgpr(<16 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
137    %1:sgpr(s32) = COPY $sgpr8
138    %2:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
139    S_ENDPGM 0, implicit %2
140...
141
142---
143name: extract_vector_elt_s_s32_v32s32
144legalized: true
145regBankSelected: true
146
147body: |
148  bb.0:
149    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31, $sgpr40
150
151    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v32s32
152    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_1024 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
153    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr40
154    ; MOVREL: $m0 = COPY [[COPY1]]
155    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
156    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
157    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v32s32
158    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_1024 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
159    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr40
160    ; GPRIDX: $m0 = COPY [[COPY1]]
161    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
162    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
163    %0:sgpr(<32 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
164    %1:sgpr(s32) = COPY $sgpr40
165    %2:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
166    S_ENDPGM 0, implicit %2
167...
168
169---
170name: extract_vector_elt_s_s64_v2s64
171legalized: true
172regBankSelected: true
173
174body: |
175  bb.0:
176    liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4
177
178    ; MOVREL-LABEL: name: extract_vector_elt_s_s64_v2s64
179    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
180    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr4
181    ; MOVREL: $m0 = COPY [[COPY1]]
182    ; MOVREL: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
183    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
184    ; GPRIDX-LABEL: name: extract_vector_elt_s_s64_v2s64
185    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
186    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr4
187    ; GPRIDX: $m0 = COPY [[COPY1]]
188    ; GPRIDX: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
189    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
190    %0:sgpr(<2 x s64>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
191    %1:sgpr(s32) = COPY $sgpr4
192    %2:sgpr(s64) = G_EXTRACT_VECTOR_ELT %0, %1
193    S_ENDPGM 0, implicit %2
194...
195
196---
197name: extract_vector_elt_s_s64_v4s64
198legalized: true
199regBankSelected: true
200
201body: |
202  bb.0:
203    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8
204
205    ; MOVREL-LABEL: name: extract_vector_elt_s_s64_v4s64
206    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
207    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
208    ; MOVREL: $m0 = COPY [[COPY1]]
209    ; MOVREL: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
210    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
211    ; GPRIDX-LABEL: name: extract_vector_elt_s_s64_v4s64
212    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
213    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
214    ; GPRIDX: $m0 = COPY [[COPY1]]
215    ; GPRIDX: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
216    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
217    %0:sgpr(<4 x s64>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
218    %1:sgpr(s32) = COPY $sgpr8
219    %2:sgpr(s64) = G_EXTRACT_VECTOR_ELT %0, %1
220    S_ENDPGM 0, implicit %2
221...
222
223---
224name: extract_vector_elt_s_s64_v8s64
225legalized: true
226regBankSelected: true
227
228body: |
229  bb.0:
230    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
231
232    ; MOVREL-LABEL: name: extract_vector_elt_s_s64_v8s64
233    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
234    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
235    ; MOVREL: $m0 = COPY [[COPY1]]
236    ; MOVREL: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
237    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
238    ; GPRIDX-LABEL: name: extract_vector_elt_s_s64_v8s64
239    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
240    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
241    ; GPRIDX: $m0 = COPY [[COPY1]]
242    ; GPRIDX: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
243    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
244    %0:sgpr(<8 x s64>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
245    %1:sgpr(s32) = COPY $sgpr8
246    %2:sgpr(s64) = G_EXTRACT_VECTOR_ELT %0, %1
247    S_ENDPGM 0, implicit %2
248...
249
250---
251name: extract_vector_elt_s_s64_v16s64
252legalized: true
253regBankSelected: true
254
255body: |
256  bb.0:
257    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31, $sgpr40
258
259    ; MOVREL-LABEL: name: extract_vector_elt_s_s64_v16s64
260    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_1024 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
261    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr40
262    ; MOVREL: $m0 = COPY [[COPY1]]
263    ; MOVREL: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
264    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
265    ; GPRIDX-LABEL: name: extract_vector_elt_s_s64_v16s64
266    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_1024 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
267    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr40
268    ; GPRIDX: $m0 = COPY [[COPY1]]
269    ; GPRIDX: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
270    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
271    %0:sgpr(<16 x s64>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
272    %1:sgpr(s32) = COPY $sgpr40
273    %2:sgpr(s64) = G_EXTRACT_VECTOR_ELT %0, %1
274    S_ENDPGM 0, implicit %2
275...
276
277---
278name: extract_vector_elt_s_s32_v8s32_idx_offset_1
279legalized: true
280regBankSelected: true
281
282body: |
283  bb.0:
284    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8
285
286    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v8s32_idx_offset_1
287    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
288    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
289    ; MOVREL: $m0 = COPY [[COPY1]]
290    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub1, implicit $m0, implicit [[COPY]]
291    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
292    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v8s32_idx_offset_1
293    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
294    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
295    ; GPRIDX: $m0 = COPY [[COPY1]]
296    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub1, implicit $m0, implicit [[COPY]]
297    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
298    %0:sgpr(<8 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
299    %1:sgpr(s32) = COPY $sgpr8
300    %2:sgpr(s32) = G_CONSTANT i32 1
301    %3:sgpr(s32) = G_ADD %1, %2
302    %4:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %3
303    S_ENDPGM 0, implicit %4
304...
305
306---
307name: extract_vector_elt_s_s32_v8s32_idx_offset_m1
308legalized: true
309regBankSelected: true
310
311body: |
312  bb.0:
313    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8
314
315    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v8s32_idx_offset_m1
316    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
317    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
318    ; MOVREL: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
319    ; MOVREL: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
320    ; MOVREL: $m0 = COPY [[S_ADD_I32_]]
321    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
322    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
323    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v8s32_idx_offset_m1
324    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
325    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
326    ; GPRIDX: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
327    ; GPRIDX: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
328    ; GPRIDX: $m0 = COPY [[S_ADD_I32_]]
329    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
330    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
331    %0:sgpr(<8 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
332    %1:sgpr(s32) = COPY $sgpr8
333    %2:sgpr(s32) = G_CONSTANT i32 -1
334    %3:sgpr(s32) = G_ADD %1, %2
335    %4:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %3
336    S_ENDPGM 0, implicit %4
337...
338
339---
340name: extract_vector_elt_s_s32_v8s32_idx_offset_7
341legalized: true
342regBankSelected: true
343
344body: |
345  bb.0:
346    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8
347
348    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v8s32_idx_offset_7
349    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
350    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
351    ; MOVREL: $m0 = COPY [[COPY1]]
352    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub7, implicit $m0, implicit [[COPY]]
353    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
354    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v8s32_idx_offset_7
355    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
356    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
357    ; GPRIDX: $m0 = COPY [[COPY1]]
358    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub7, implicit $m0, implicit [[COPY]]
359    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
360    %0:sgpr(<8 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
361    %1:sgpr(s32) = COPY $sgpr8
362    %2:sgpr(s32) = G_CONSTANT i32 7
363    %3:sgpr(s32) = G_ADD %1, %2
364    %4:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %3
365    S_ENDPGM 0, implicit %4
366...
367
368---
369name: extract_vector_elt_s_s32_v8s32_idx_offset_8
370legalized: true
371regBankSelected: true
372
373body: |
374  bb.0:
375    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8
376
377    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v8s32_idx_offset_8
378    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
379    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
380    ; MOVREL: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 8
381    ; MOVREL: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
382    ; MOVREL: $m0 = COPY [[S_ADD_I32_]]
383    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
384    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
385    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v8s32_idx_offset_8
386    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
387    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
388    ; GPRIDX: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 8
389    ; GPRIDX: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
390    ; GPRIDX: $m0 = COPY [[S_ADD_I32_]]
391    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
392    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
393    %0:sgpr(<8 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
394    %1:sgpr(s32) = COPY $sgpr8
395    %2:sgpr(s32) = G_CONSTANT i32 8
396    %3:sgpr(s32) = G_ADD %1, %2
397    %4:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %3
398    S_ENDPGM 0, implicit %4
399...
400
401---
402name: extract_vector_elt_s_s64_v8s64_idx_offset_1
403legalized: true
404regBankSelected: true
405
406body: |
407  bb.0:
408    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
409
410    ; MOVREL-LABEL: name: extract_vector_elt_s_s64_v8s64_idx_offset_1
411    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
412    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
413    ; MOVREL: $m0 = COPY [[COPY1]]
414    ; MOVREL: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub2_sub3, implicit $m0, implicit [[COPY]]
415    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
416    ; GPRIDX-LABEL: name: extract_vector_elt_s_s64_v8s64_idx_offset_1
417    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
418    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
419    ; GPRIDX: $m0 = COPY [[COPY1]]
420    ; GPRIDX: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub2_sub3, implicit $m0, implicit [[COPY]]
421    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
422    %0:sgpr(<8 x s64>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
423    %1:sgpr(s32) = COPY $sgpr8
424    %2:sgpr(s32) = G_CONSTANT i32 1
425    %3:sgpr(s32) = G_ADD %1, %2
426    %4:sgpr(s64) = G_EXTRACT_VECTOR_ELT %0, %3
427    S_ENDPGM 0, implicit %4
428...
429
430---
431name: extract_vector_elt_s_s64_v8s64_idx_offset_2
432legalized: true
433regBankSelected: true
434
435body: |
436  bb.0:
437    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
438
439    ; MOVREL-LABEL: name: extract_vector_elt_s_s64_v8s64_idx_offset_2
440    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
441    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
442    ; MOVREL: $m0 = COPY [[COPY1]]
443    ; MOVREL: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub4_sub5, implicit $m0, implicit [[COPY]]
444    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
445    ; GPRIDX-LABEL: name: extract_vector_elt_s_s64_v8s64_idx_offset_2
446    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
447    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
448    ; GPRIDX: $m0 = COPY [[COPY1]]
449    ; GPRIDX: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub4_sub5, implicit $m0, implicit [[COPY]]
450    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
451    %0:sgpr(<8 x s64>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
452    %1:sgpr(s32) = COPY $sgpr8
453    %2:sgpr(s32) = G_CONSTANT i32 2
454    %3:sgpr(s32) = G_ADD %1, %2
455    %4:sgpr(s64) = G_EXTRACT_VECTOR_ELT %0, %3
456    S_ENDPGM 0, implicit %4
457...
458
459---
460name: extract_vector_elt_s_s64_v8s64_idx_offset_m1
461legalized: true
462regBankSelected: true
463
464body: |
465  bb.0:
466    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
467
468    ; MOVREL-LABEL: name: extract_vector_elt_s_s64_v8s64_idx_offset_m1
469    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
470    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
471    ; MOVREL: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
472    ; MOVREL: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
473    ; MOVREL: $m0 = COPY [[S_ADD_I32_]]
474    ; MOVREL: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
475    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
476    ; GPRIDX-LABEL: name: extract_vector_elt_s_s64_v8s64_idx_offset_m1
477    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
478    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
479    ; GPRIDX: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
480    ; GPRIDX: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
481    ; GPRIDX: $m0 = COPY [[S_ADD_I32_]]
482    ; GPRIDX: [[S_MOVRELS_B64_:%[0-9]+]]:sreg_64 = S_MOVRELS_B64 [[COPY]].sub0_sub1, implicit $m0, implicit [[COPY]]
483    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B64_]]
484    %0:sgpr(<8 x s64>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
485    %1:sgpr(s32) = COPY $sgpr8
486    %2:sgpr(s32) = G_CONSTANT i32 -1
487    %3:sgpr(s32) = G_ADD %1, %2
488    %4:sgpr(s64) = G_EXTRACT_VECTOR_ELT %0, %3
489    S_ENDPGM 0, implicit %4
490...
491
492---
493name: extract_vector_elt_v_s32_v2s32
494legalized: true
495regBankSelected: true
496
497body: |
498  bb.0:
499    liveins: $vgpr0_vgpr1, $sgpr2
500
501    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v2s32
502    ; MOVREL: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
503    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
504    ; MOVREL: $m0 = COPY [[COPY1]]
505    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub0, implicit $m0, implicit $exec, implicit [[COPY]]
506    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
507    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v2s32
508    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
509    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
510    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V2_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V2 [[COPY]], [[COPY1]], 3, implicit-def $m0, implicit $m0, implicit $exec
511    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V2_]]
512    %0:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
513    %1:sgpr(s32) = COPY $sgpr2
514    %2:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
515    S_ENDPGM 0, implicit %2
516...
517
518---
519name: extract_vector_elt_v_s32_v3s32
520legalized: true
521regBankSelected: true
522
523body: |
524  bb.0:
525    liveins: $vgpr0_vgpr1_vgpr2, $sgpr3
526
527    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v3s32
528    ; MOVREL: [[COPY:%[0-9]+]]:vreg_96 = COPY $vgpr0_vgpr1_vgpr2
529    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
530    ; MOVREL: $m0 = COPY [[COPY1]]
531    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub0, implicit $m0, implicit $exec, implicit [[COPY]]
532    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
533    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v3s32
534    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_96 = COPY $vgpr0_vgpr1_vgpr2
535    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
536    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V3_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V3 [[COPY]], [[COPY1]], 3, implicit-def $m0, implicit $m0, implicit $exec
537    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V3_]]
538    %0:vgpr(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
539    %1:sgpr(s32) = COPY $sgpr2
540    %2:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
541    S_ENDPGM 0, implicit %2
542...
543
544---
545name: extract_vector_elt_v_s32_v4s32
546legalized: true
547regBankSelected: true
548
549body: |
550  bb.0:
551    liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $sgpr4
552
553    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v4s32
554    ; MOVREL: [[COPY:%[0-9]+]]:vreg_128 = COPY $vgpr0_vgpr1_vgpr2_vgpr3
555    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr4
556    ; MOVREL: $m0 = COPY [[COPY1]]
557    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub0, implicit $m0, implicit $exec, implicit [[COPY]]
558    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
559    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v4s32
560    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_128 = COPY $vgpr0_vgpr1_vgpr2_vgpr3
561    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr4
562    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V4_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V4 [[COPY]], [[COPY1]], 3, implicit-def $m0, implicit $m0, implicit $exec
563    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V4_]]
564    %0:vgpr(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
565    %1:sgpr(s32) = COPY $sgpr4
566    %2:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
567    S_ENDPGM 0, implicit %2
568...
569
570---
571name: extract_vector_elt_v_s32_v8s32
572legalized: true
573regBankSelected: true
574
575body: |
576  bb.0:
577    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8
578
579    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v8s32
580    ; MOVREL: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
581    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
582    ; MOVREL: $m0 = COPY [[COPY1]]
583    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub0, implicit $m0, implicit $exec, implicit [[COPY]]
584    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
585    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v8s32
586    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
587    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
588    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V8 [[COPY]], [[COPY1]], 3, implicit-def $m0, implicit $m0, implicit $exec
589    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_]]
590    %0:vgpr(<8 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
591    %1:sgpr(s32) = COPY $sgpr8
592    %2:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
593    S_ENDPGM 0, implicit %2
594...
595
596---
597name: extract_vector_elt_v_s32_v16s32
598legalized: true
599regBankSelected: true
600
601body: |
602  bb.0:
603    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
604
605    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v16s32
606    ; MOVREL: [[COPY:%[0-9]+]]:vreg_512 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
607    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
608    ; MOVREL: $m0 = COPY [[COPY1]]
609    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub0, implicit $m0, implicit $exec, implicit [[COPY]]
610    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
611    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v16s32
612    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_512 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
613    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
614    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V16_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V16 [[COPY]], [[COPY1]], 3, implicit-def $m0, implicit $m0, implicit $exec
615    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V16_]]
616    %0:vgpr(<16 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
617    %1:sgpr(s32) = COPY $sgpr8
618    %2:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
619    S_ENDPGM 0, implicit %2
620...
621
622---
623name: extract_vector_elt_v_s32_v32s32
624legalized: true
625regBankSelected: true
626
627body: |
628  bb.0:
629    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31, $sgpr40
630
631    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v32s32
632    ; MOVREL: [[COPY:%[0-9]+]]:vreg_1024 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
633    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr40
634    ; MOVREL: $m0 = COPY [[COPY1]]
635    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub0, implicit $m0, implicit $exec, implicit [[COPY]]
636    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
637    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v32s32
638    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_1024 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
639    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr40
640    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V32_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V32 [[COPY]], [[COPY1]], 3, implicit-def $m0, implicit $m0, implicit $exec
641    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V32_]]
642    %0:vgpr(<32 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
643    %1:sgpr(s32) = COPY $sgpr40
644    %2:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
645    S_ENDPGM 0, implicit %2
646...
647
648---
649name: extract_vector_elt_v_s32_v8s32_idx_offset_1
650legalized: true
651regBankSelected: true
652
653body: |
654  bb.0:
655    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $sgpr8
656
657    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v8s32_idx_offset_1
658    ; MOVREL: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
659    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
660    ; MOVREL: $m0 = COPY [[COPY1]]
661    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub1, implicit $m0, implicit $exec, implicit [[COPY]]
662    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
663    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v8s32_idx_offset_1
664    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
665    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
666    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V8 [[COPY]], [[COPY1]], 11, implicit-def $m0, implicit $m0, implicit $exec
667    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_]]
668    %0:vgpr(<8 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
669    %1:sgpr(s32) = COPY $sgpr8
670    %2:sgpr(s32) = G_CONSTANT i32 1
671    %3:sgpr(s32) = G_ADD %1, %2
672    %4:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %3
673    S_ENDPGM 0, implicit %4
674...
675
676---
677name: extract_vector_elt_v_s32_v8s32_idx_offset_m1
678legalized: true
679regBankSelected: true
680
681body: |
682  bb.0:
683    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $sgpr8
684
685    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v8s32_idx_offset_m1
686    ; MOVREL: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
687    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
688    ; MOVREL: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
689    ; MOVREL: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
690    ; MOVREL: $m0 = COPY [[S_ADD_I32_]]
691    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub0, implicit $m0, implicit $exec, implicit [[COPY]]
692    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
693    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v8s32_idx_offset_m1
694    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
695    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
696    ; GPRIDX: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
697    ; GPRIDX: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
698    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V8 [[COPY]], [[S_ADD_I32_]], 3, implicit-def $m0, implicit $m0, implicit $exec
699    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_]]
700    %0:vgpr(<8 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
701    %1:sgpr(s32) = COPY $sgpr8
702    %2:sgpr(s32) = G_CONSTANT i32 -1
703    %3:sgpr(s32) = G_ADD %1, %2
704    %4:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %3
705    S_ENDPGM 0, implicit %4
706...
707
708---
709name: extract_vector_elt_v_s32_v8s32_idx_offset_7
710legalized: true
711regBankSelected: true
712
713body: |
714  bb.0:
715    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $sgpr8
716
717    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v8s32_idx_offset_7
718    ; MOVREL: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
719    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
720    ; MOVREL: $m0 = COPY [[COPY1]]
721    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub7, implicit $m0, implicit $exec, implicit [[COPY]]
722    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
723    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v8s32_idx_offset_7
724    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
725    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
726    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V8 [[COPY]], [[COPY1]], 71, implicit-def $m0, implicit $m0, implicit $exec
727    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_]]
728    %0:vgpr(<8 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
729    %1:sgpr(s32) = COPY $sgpr8
730    %2:sgpr(s32) = G_CONSTANT i32 7
731    %3:sgpr(s32) = G_ADD %1, %2
732    %4:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %3
733    S_ENDPGM 0, implicit %4
734...
735
736---
737name: extract_vector_elt_v_s32_v8s32_idx_offset_8
738legalized: true
739regBankSelected: true
740
741body: |
742  bb.0:
743    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $sgpr8
744
745    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v8s32_idx_offset_8
746    ; MOVREL: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
747    ; MOVREL: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
748    ; MOVREL: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 8
749    ; MOVREL: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
750    ; MOVREL: $m0 = COPY [[S_ADD_I32_]]
751    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub0, implicit $m0, implicit $exec, implicit [[COPY]]
752    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
753    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v8s32_idx_offset_8
754    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
755    ; GPRIDX: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr8
756    ; GPRIDX: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 8
757    ; GPRIDX: [[S_ADD_I32_:%[0-9]+]]:sreg_32 = S_ADD_I32 [[COPY1]], [[S_MOV_B32_]], implicit-def $scc
758    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V8 [[COPY]], [[S_ADD_I32_]], 3, implicit-def $m0, implicit $m0, implicit $exec
759    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V8_]]
760    %0:vgpr(<8 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
761    %1:sgpr(s32) = COPY $sgpr8
762    %2:sgpr(s32) = G_CONSTANT i32 8
763    %3:sgpr(s32) = G_ADD %1, %2
764    %4:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %3
765    S_ENDPGM 0, implicit %4
766...
767
768---
769name: extract_vector_elt_s_s32_v4s32_const_idx
770legalized: true
771regBankSelected: true
772
773body: |
774  bb.0:
775    liveins: $sgpr0_sgpr1_sgpr2_sgpr3
776
777    ; MOVREL-LABEL: name: extract_vector_elt_s_s32_v4s32_const_idx
778    ; MOVREL: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
779    ; MOVREL: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 0
780    ; MOVREL: $m0 = COPY [[S_MOV_B32_]]
781    ; MOVREL: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
782    ; MOVREL: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
783    ; GPRIDX-LABEL: name: extract_vector_elt_s_s32_v4s32_const_idx
784    ; GPRIDX: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
785    ; GPRIDX: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 0
786    ; GPRIDX: $m0 = COPY [[S_MOV_B32_]]
787    ; GPRIDX: [[S_MOVRELS_B32_:%[0-9]+]]:sreg_32 = S_MOVRELS_B32 [[COPY]].sub0, implicit $m0, implicit [[COPY]]
788    ; GPRIDX: S_ENDPGM 0, implicit [[S_MOVRELS_B32_]]
789    %0:sgpr(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
790    %1:sgpr(s32) = G_CONSTANT i32 0
791    %2:sgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
792    S_ENDPGM 0, implicit %2
793...
794
795---
796name: extract_vector_elt_v_s32_v4s32_const_idx
797legalized: true
798regBankSelected: true
799
800body: |
801  bb.0:
802    liveins: $vgpr0_vgpr1_vgpr2_vgpr3
803
804    ; MOVREL-LABEL: name: extract_vector_elt_v_s32_v4s32_const_idx
805    ; MOVREL: [[COPY:%[0-9]+]]:vreg_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
806    ; MOVREL: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 0
807    ; MOVREL: $m0 = COPY [[S_MOV_B32_]]
808    ; MOVREL: [[V_MOVRELS_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOVRELS_B32_e32 [[COPY]].sub0, implicit $m0, implicit $exec, implicit [[COPY]]
809    ; MOVREL: S_ENDPGM 0, implicit [[V_MOVRELS_B32_e32_]]
810    ; GPRIDX-LABEL: name: extract_vector_elt_v_s32_v4s32_const_idx
811    ; GPRIDX: [[COPY:%[0-9]+]]:vreg_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
812    ; GPRIDX: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 0
813    ; GPRIDX: [[V_INDIRECT_REG_READ_GPR_IDX_B32_V4_:%[0-9]+]]:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V4 [[COPY]], [[S_MOV_B32_]], 3, implicit-def $m0, implicit $m0, implicit $exec
814    ; GPRIDX: S_ENDPGM 0, implicit [[V_INDIRECT_REG_READ_GPR_IDX_B32_V4_]]
815    %0:vgpr(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
816    %1:sgpr(s32) = G_CONSTANT i32 0
817    %2:vgpr(s32) = G_EXTRACT_VECTOR_ELT %0, %1
818    S_ENDPGM 0, implicit %2
819...
820