1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -O0 -run-pass=legalizer -global-isel-abort=0  %s -o - | FileCheck -check-prefix=SI %s
3# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=bonaire -O0 -run-pass=legalizer -global-isel-abort=0  %s -o - | FileCheck -check-prefix=CI %s
4# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer  -global-isel-abort=0 %s -o - | FileCheck -check-prefix=VI %s
5# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -O0 -run-pass=legalizer  -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX9 %s
6
7---
8name: test_store_global_s1_align1
9body: |
10  bb.0:
11    liveins: $vgpr0_vgpr1, $vgpr2
12
13    ; SI-LABEL: name: test_store_global_s1_align1
14    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
15    ; SI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
16    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
17    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
18    ; SI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
19    ; SI: G_STORE [[AND]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
20    ; CI-LABEL: name: test_store_global_s1_align1
21    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
22    ; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
23    ; CI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
24    ; CI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
25    ; CI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
26    ; CI: G_STORE [[AND]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
27    ; VI-LABEL: name: test_store_global_s1_align1
28    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
29    ; VI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
30    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
31    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
32    ; VI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
33    ; VI: G_STORE [[AND]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
34    ; GFX9-LABEL: name: test_store_global_s1_align1
35    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
36    ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
37    ; GFX9: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
38    ; GFX9: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
39    ; GFX9: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
40    ; GFX9: G_STORE [[AND]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
41    %0:_(p1) = COPY $vgpr0_vgpr1
42    %1:_(s32) = COPY $vgpr2
43    %2:_(s1) = G_TRUNC %1
44    G_STORE %2, %0 :: (store 1, align 1, addrspace 1)
45...
46
47---
48name: test_store_global_s8_align1
49body: |
50  bb.0:
51    liveins: $vgpr0_vgpr1, $vgpr2
52
53    ; SI-LABEL: name: test_store_global_s8_align1
54    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
55    ; SI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
56    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
57    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
58    ; CI-LABEL: name: test_store_global_s8_align1
59    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
60    ; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
61    ; CI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
62    ; CI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
63    ; VI-LABEL: name: test_store_global_s8_align1
64    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
65    ; VI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
66    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
67    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
68    ; GFX9-LABEL: name: test_store_global_s8_align1
69    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
70    ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
71    ; GFX9: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
72    ; GFX9: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
73    %0:_(p1) = COPY $vgpr0_vgpr1
74    %1:_(s32) = COPY $vgpr2
75    %2:_(s8) = G_TRUNC %1
76    G_STORE %2, %0 :: (store 1, align 1, addrspace 1)
77...
78
79---
80name: test_store_global_s16_align1
81body: |
82  bb.0:
83    liveins: $vgpr0_vgpr1, $vgpr2
84
85    ; SI-LABEL: name: test_store_global_s16_align1
86    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
87    ; SI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
88    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
89    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
90    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
91    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C1]](s32)
92    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
93    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C2]](s32)
94    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
95    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
96    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
97    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
98    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
99    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
100    ; CI-LABEL: name: test_store_global_s16_align1
101    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
102    ; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
103    ; CI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
104    ; CI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, align 1, addrspace 1)
105    ; VI-LABEL: name: test_store_global_s16_align1
106    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
107    ; VI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
108    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
109    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
110    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
111    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C1]](s32)
112    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
113    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C2]](s32)
114    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
115    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
116    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
117    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
118    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
119    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
120    ; GFX9-LABEL: name: test_store_global_s16_align1
121    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
122    ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
123    ; GFX9: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
124    ; GFX9: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, align 1, addrspace 1)
125    %0:_(p1) = COPY $vgpr0_vgpr1
126    %1:_(s32) = COPY $vgpr2
127    %2:_(s16) = G_TRUNC %1
128    G_STORE %2, %0 :: (store 2, align 1, addrspace 1)
129...
130
131---
132name: test_store_global_s16_align2
133body: |
134  bb.0:
135    liveins: $vgpr0_vgpr1, $vgpr2
136
137    ; SI-LABEL: name: test_store_global_s16_align2
138    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
139    ; SI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
140    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
141    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
142    ; CI-LABEL: name: test_store_global_s16_align2
143    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
144    ; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
145    ; CI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
146    ; CI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
147    ; VI-LABEL: name: test_store_global_s16_align2
148    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
149    ; VI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
150    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
151    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
152    ; GFX9-LABEL: name: test_store_global_s16_align2
153    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
154    ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
155    ; GFX9: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
156    ; GFX9: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
157    %0:_(p1) = COPY $vgpr0_vgpr1
158    %1:_(s32) = COPY $vgpr2
159    %2:_(s16) = G_TRUNC %1
160    G_STORE %2, %0 :: (store 2, align 2, addrspace 1)
161...
162
163---
164name: test_store_global_s16_align4
165body: |
166  bb.0:
167    liveins: $vgpr0_vgpr1, $vgpr2
168
169    ; SI-LABEL: name: test_store_global_s16_align4
170    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
171    ; SI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
172    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
173    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, align 4, addrspace 1)
174    ; CI-LABEL: name: test_store_global_s16_align4
175    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
176    ; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
177    ; CI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
178    ; CI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, align 4, addrspace 1)
179    ; VI-LABEL: name: test_store_global_s16_align4
180    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
181    ; VI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
182    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
183    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, align 4, addrspace 1)
184    ; GFX9-LABEL: name: test_store_global_s16_align4
185    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
186    ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
187    ; GFX9: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
188    ; GFX9: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, align 4, addrspace 1)
189    %0:_(p1) = COPY $vgpr0_vgpr1
190    %1:_(s32) = COPY $vgpr2
191    %2:_(s16) = G_TRUNC %1
192    G_STORE %2, %0 :: (store 2, align 4, addrspace 1)
193...
194
195---
196name: test_store_global_s32_align1
197body: |
198  bb.0:
199    liveins: $vgpr0_vgpr1, $vgpr2
200
201    ; SI-LABEL: name: test_store_global_s32_align1
202    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
203    ; SI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
204    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
205    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
206    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
207    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C1]](s32)
208    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
209    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C2]](s32)
210    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
211    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
212    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
213    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
214    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
215    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
216    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
217    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
218    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
219    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
220    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
221    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
222    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
223    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
224    ; CI-LABEL: name: test_store_global_s32_align1
225    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
226    ; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
227    ; CI: G_STORE [[COPY1]](s32), [[COPY]](p1) :: (store 4, align 1, addrspace 1)
228    ; VI-LABEL: name: test_store_global_s32_align1
229    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
230    ; VI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
231    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
232    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
233    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
234    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C1]](s32)
235    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
236    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C2]](s32)
237    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
238    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
239    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
240    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
241    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
242    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
243    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
244    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
245    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
246    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
247    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
248    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
249    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
250    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
251    ; GFX9-LABEL: name: test_store_global_s32_align1
252    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
253    ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
254    ; GFX9: G_STORE [[COPY1]](s32), [[COPY]](p1) :: (store 4, align 1, addrspace 1)
255    %0:_(p1) = COPY $vgpr0_vgpr1
256    %1:_(s32) = COPY $vgpr2
257    G_STORE %1, %0 :: (store 4, align 1, addrspace 1)
258...
259
260---
261name: test_store_global_s32_align2
262body: |
263  bb.0:
264    liveins: $vgpr0_vgpr1, $vgpr2
265
266    ; SI-LABEL: name: test_store_global_s32_align2
267    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
268    ; SI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
269    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
270    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
271    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
272    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
273    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
274    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
275    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
276    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
277    ; CI-LABEL: name: test_store_global_s32_align2
278    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
279    ; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
280    ; CI: G_STORE [[COPY1]](s32), [[COPY]](p1) :: (store 4, align 2, addrspace 1)
281    ; VI-LABEL: name: test_store_global_s32_align2
282    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
283    ; VI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
284    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
285    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
286    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
287    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
288    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
289    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
290    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
291    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
292    ; GFX9-LABEL: name: test_store_global_s32_align2
293    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
294    ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
295    ; GFX9: G_STORE [[COPY1]](s32), [[COPY]](p1) :: (store 4, align 2, addrspace 1)
296    %0:_(p1) = COPY $vgpr0_vgpr1
297    %1:_(s32) = COPY $vgpr2
298    G_STORE %1, %0 :: (store 4, align 2, addrspace 1)
299...
300
301---
302name: test_store_global_s32_align4
303body: |
304  bb.0:
305    liveins: $vgpr0_vgpr1, $vgpr2
306
307    ; SI-LABEL: name: test_store_global_s32_align4
308    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
309    ; SI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
310    ; SI: G_STORE [[COPY1]](s32), [[COPY]](p1) :: (store 4, addrspace 1)
311    ; CI-LABEL: name: test_store_global_s32_align4
312    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
313    ; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
314    ; CI: G_STORE [[COPY1]](s32), [[COPY]](p1) :: (store 4, addrspace 1)
315    ; VI-LABEL: name: test_store_global_s32_align4
316    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
317    ; VI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
318    ; VI: G_STORE [[COPY1]](s32), [[COPY]](p1) :: (store 4, addrspace 1)
319    ; GFX9-LABEL: name: test_store_global_s32_align4
320    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
321    ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
322    ; GFX9: G_STORE [[COPY1]](s32), [[COPY]](p1) :: (store 4, addrspace 1)
323    %0:_(p1) = COPY $vgpr0_vgpr1
324    %1:_(s32) = COPY $vgpr2
325    G_STORE %1, %0 :: (store 4, align 4, addrspace 1)
326...
327
328---
329name: test_store_global_p3_align1
330body: |
331  bb.0:
332    liveins: $vgpr0_vgpr1, $vgpr2
333
334    ; SI-LABEL: name: test_store_global_p3_align1
335    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
336    ; SI: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
337    ; SI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY1]](p3)
338    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
339    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
340    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
341    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C1]](s32)
342    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
343    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C2]](s32)
344    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
345    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
346    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
347    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
348    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
349    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
350    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
351    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
352    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
353    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
354    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
355    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
356    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
357    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
358    ; CI-LABEL: name: test_store_global_p3_align1
359    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
360    ; CI: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
361    ; CI: G_STORE [[COPY1]](p3), [[COPY]](p1) :: (store 4, align 1, addrspace 1)
362    ; VI-LABEL: name: test_store_global_p3_align1
363    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
364    ; VI: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
365    ; VI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY1]](p3)
366    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
367    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
368    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
369    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C1]](s32)
370    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
371    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C2]](s32)
372    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
373    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
374    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
375    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
376    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
377    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
378    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
379    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
380    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
381    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
382    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
383    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
384    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
385    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
386    ; GFX9-LABEL: name: test_store_global_p3_align1
387    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
388    ; GFX9: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
389    ; GFX9: G_STORE [[COPY1]](p3), [[COPY]](p1) :: (store 4, align 1, addrspace 1)
390    %0:_(p1) = COPY $vgpr0_vgpr1
391    %1:_(p3) = COPY $vgpr2
392    G_STORE %1, %0 :: (store 4, align 1, addrspace 1)
393...
394
395---
396name: test_store_global_p3_align2
397body: |
398  bb.0:
399    liveins: $vgpr0_vgpr1, $vgpr2
400
401    ; SI-LABEL: name: test_store_global_p3_align2
402    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
403    ; SI: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
404    ; SI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY1]](p3)
405    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
406    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
407    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
408    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
409    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
410    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
411    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
412    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
413    ; CI-LABEL: name: test_store_global_p3_align2
414    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
415    ; CI: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
416    ; CI: G_STORE [[COPY1]](p3), [[COPY]](p1) :: (store 4, align 2, addrspace 1)
417    ; VI-LABEL: name: test_store_global_p3_align2
418    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
419    ; VI: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
420    ; VI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY1]](p3)
421    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
422    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
423    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
424    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
425    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
426    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
427    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
428    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
429    ; GFX9-LABEL: name: test_store_global_p3_align2
430    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
431    ; GFX9: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
432    ; GFX9: G_STORE [[COPY1]](p3), [[COPY]](p1) :: (store 4, align 2, addrspace 1)
433    %0:_(p1) = COPY $vgpr0_vgpr1
434    %1:_(p3) = COPY $vgpr2
435    G_STORE %1, %0 :: (store 4, align 2, addrspace 1)
436...
437
438---
439name: test_store_global_p3_align4
440body: |
441  bb.0:
442    liveins: $vgpr0_vgpr1, $vgpr2
443
444    ; SI-LABEL: name: test_store_global_p3_align4
445    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
446    ; SI: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
447    ; SI: G_STORE [[COPY1]](p3), [[COPY]](p1) :: (store 4, addrspace 1)
448    ; CI-LABEL: name: test_store_global_p3_align4
449    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
450    ; CI: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
451    ; CI: G_STORE [[COPY1]](p3), [[COPY]](p1) :: (store 4, addrspace 1)
452    ; VI-LABEL: name: test_store_global_p3_align4
453    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
454    ; VI: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
455    ; VI: G_STORE [[COPY1]](p3), [[COPY]](p1) :: (store 4, addrspace 1)
456    ; GFX9-LABEL: name: test_store_global_p3_align4
457    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
458    ; GFX9: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr2
459    ; GFX9: G_STORE [[COPY1]](p3), [[COPY]](p1) :: (store 4, addrspace 1)
460    %0:_(p1) = COPY $vgpr0_vgpr1
461    %1:_(p3) = COPY $vgpr2
462    G_STORE %1, %0 :: (store 4, align 4, addrspace 1)
463...
464
465---
466name: test_store_global_s48_align1
467body: |
468  bb.0:
469    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
470
471    ; SI-LABEL: name: test_store_global_s48_align1
472    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
473    ; SI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
474    ; SI: [[COPY2:%[0-9]+]]:_(s64) = COPY [[COPY1]](s64)
475    ; SI: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY2]](s64), 0
476    ; SI: [[COPY3:%[0-9]+]]:_(s64) = COPY [[COPY1]](s64)
477    ; SI: [[EXTRACT1:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY3]](s64), 32
478    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
479    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT]], [[C]](s32)
480    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
481    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT]], [[C1]](s32)
482    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
483    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT]], [[C2]](s32)
484    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[EXTRACT]](s32)
485    ; SI: G_STORE [[COPY4]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
486    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
487    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
488    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
489    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
490    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
491    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
492    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
493    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
494    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
495    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
496    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
497    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
498    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
499    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
500    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[C]](s32)
501    ; SI: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[EXTRACT1]](s16)
502    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT]], [[COPY8]](s32)
503    ; SI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT1]](s16)
504    ; SI: G_STORE [[ANYEXT]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
505    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
506    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
507    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
508    ; CI-LABEL: name: test_store_global_s48_align1
509    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
510    ; CI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
511    ; CI: [[TRUNC:%[0-9]+]]:_(s48) = G_TRUNC [[COPY1]](s64)
512    ; CI: G_STORE [[TRUNC]](s48), [[COPY]](p1) :: (store 6, align 1, addrspace 1)
513    ; VI-LABEL: name: test_store_global_s48_align1
514    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
515    ; VI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
516    ; VI: [[COPY2:%[0-9]+]]:_(s64) = COPY [[COPY1]](s64)
517    ; VI: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY2]](s64), 0
518    ; VI: [[COPY3:%[0-9]+]]:_(s64) = COPY [[COPY1]](s64)
519    ; VI: [[EXTRACT1:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY3]](s64), 32
520    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
521    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT]], [[C]](s32)
522    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
523    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT]], [[C1]](s32)
524    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
525    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT]], [[C2]](s32)
526    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[EXTRACT]](s32)
527    ; VI: G_STORE [[COPY4]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
528    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
529    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
530    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
531    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
532    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
533    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
534    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
535    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
536    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
537    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
538    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
539    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
540    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
541    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
542    ; VI: [[C7:%[0-9]+]]:_(s16) = G_CONSTANT i16 8
543    ; VI: [[LSHR3:%[0-9]+]]:_(s16) = G_LSHR [[EXTRACT1]], [[C7]](s16)
544    ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT1]](s16)
545    ; VI: G_STORE [[ANYEXT]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
546    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
547    ; VI: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR3]](s16)
548    ; VI: G_STORE [[ANYEXT1]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
549    ; GFX9-LABEL: name: test_store_global_s48_align1
550    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
551    ; GFX9: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
552    ; GFX9: [[TRUNC:%[0-9]+]]:_(s48) = G_TRUNC [[COPY1]](s64)
553    ; GFX9: G_STORE [[TRUNC]](s48), [[COPY]](p1) :: (store 6, align 1, addrspace 1)
554    %0:_(p1) = COPY $vgpr0_vgpr1
555    %1:_(s64) = COPY $vgpr2_vgpr3
556    %2:_(s48) = G_TRUNC %1
557    G_STORE %2, %0 :: (store 6, align 1, addrspace 1)
558...
559
560---
561name: test_store_global_s48_align2
562body: |
563  bb.0:
564    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
565
566    ; SI-LABEL: name: test_store_global_s48_align2
567    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
568    ; SI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
569    ; SI: [[COPY2:%[0-9]+]]:_(s64) = COPY [[COPY1]](s64)
570    ; SI: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY2]](s64), 0
571    ; SI: [[COPY3:%[0-9]+]]:_(s64) = COPY [[COPY1]](s64)
572    ; SI: [[EXTRACT1:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY3]](s64), 32
573    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
574    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT]], [[C]](s32)
575    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[EXTRACT]](s32)
576    ; SI: G_STORE [[COPY4]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
577    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
578    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
579    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
580    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
581    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
582    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
583    ; SI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT1]](s16)
584    ; SI: G_STORE [[ANYEXT]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
585    ; CI-LABEL: name: test_store_global_s48_align2
586    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
587    ; CI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
588    ; CI: [[TRUNC:%[0-9]+]]:_(s48) = G_TRUNC [[COPY1]](s64)
589    ; CI: G_STORE [[TRUNC]](s48), [[COPY]](p1) :: (store 6, align 2, addrspace 1)
590    ; VI-LABEL: name: test_store_global_s48_align2
591    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
592    ; VI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
593    ; VI: [[COPY2:%[0-9]+]]:_(s64) = COPY [[COPY1]](s64)
594    ; VI: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY2]](s64), 0
595    ; VI: [[COPY3:%[0-9]+]]:_(s64) = COPY [[COPY1]](s64)
596    ; VI: [[EXTRACT1:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY3]](s64), 32
597    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
598    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT]], [[C]](s32)
599    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[EXTRACT]](s32)
600    ; VI: G_STORE [[COPY4]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
601    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
602    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
603    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
604    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
605    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
606    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
607    ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT1]](s16)
608    ; VI: G_STORE [[ANYEXT]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
609    ; GFX9-LABEL: name: test_store_global_s48_align2
610    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
611    ; GFX9: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
612    ; GFX9: [[TRUNC:%[0-9]+]]:_(s48) = G_TRUNC [[COPY1]](s64)
613    ; GFX9: G_STORE [[TRUNC]](s48), [[COPY]](p1) :: (store 6, align 2, addrspace 1)
614    %0:_(p1) = COPY $vgpr0_vgpr1
615    %1:_(s64) = COPY $vgpr2_vgpr3
616    %2:_(s48) = G_TRUNC %1
617    G_STORE %2, %0 :: (store 6, align 2, addrspace 1)
618...
619
620# ---
621# name: test_store_global_s48_align4
622# body: |
623#   bb.0:
624#     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
625
626#     %0:_(p1) = COPY $vgpr0_vgpr1
627#     %1:_(s64) = COPY $vgpr2_vgpr3
628#     %2:_(s48) = G_TRUNC %1
629#     G_STORE %2, %0 :: (store 6, align 4, addrspace 1)
630# ...
631
632# ---
633# name: test_store_global_s48_align8
634# body: |
635#   bb.0:
636#     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
637
638#     %0:_(p1) = COPY $vgpr0_vgpr1
639#     %1:_(s64) = COPY $vgpr2_vgpr3
640#     %2:_(s48) = G_TRUNC %1
641#     G_STORE %2, %0 :: (store 6, align 8, addrspace 1)
642# ...
643
644
645---
646name: test_store_global_s64_align1
647body: |
648  bb.0:
649    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
650
651    ; SI-LABEL: name: test_store_global_s64_align1
652    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
653    ; SI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
654    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
655    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
656    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
657    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
658    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
659    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
660    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
661    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
662    ; SI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C2]]
663    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY2]](s32)
664    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
665    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
666    ; SI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C2]]
667    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY4]](s32)
668    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
669    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
670    ; SI: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C2]]
671    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[COPY6]](s32)
672    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
673    ; SI: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[C2]]
674    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[C1]](s32)
675    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
676    ; SI: G_STORE [[COPY9]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
677    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
678    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
679    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
680    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
681    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
682    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
683    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
684    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
685    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
686    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
687    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
688    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
689    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
690    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
691    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
692    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
693    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
694    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
695    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
696    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
697    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
698    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
699    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
700    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
701    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
702    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
703    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
704    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
705    ; CI-LABEL: name: test_store_global_s64_align1
706    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
707    ; CI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
708    ; CI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
709    ; VI-LABEL: name: test_store_global_s64_align1
710    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
711    ; VI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
712    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
713    ; VI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[UV]](s32)
714    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
715    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
716    ; VI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR]](s32)
717    ; VI: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[UV1]](s32)
718    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
719    ; VI: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR1]](s32)
720    ; VI: [[C1:%[0-9]+]]:_(s16) = G_CONSTANT i16 8
721    ; VI: [[LSHR2:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[C1]](s16)
722    ; VI: [[LSHR3:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC1]], [[C1]](s16)
723    ; VI: [[LSHR4:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC2]], [[C1]](s16)
724    ; VI: [[LSHR5:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC3]], [[C1]](s16)
725    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
726    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
727    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
728    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
729    ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR2]](s16)
730    ; VI: G_STORE [[ANYEXT]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
731    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
732    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
733    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
734    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
735    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
736    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
737    ; VI: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR3]](s16)
738    ; VI: G_STORE [[ANYEXT1]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
739    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
740    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
741    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
742    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
743    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
744    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
745    ; VI: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR4]](s16)
746    ; VI: G_STORE [[ANYEXT2]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
747    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
748    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
749    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
750    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
751    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
752    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
753    ; VI: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR5]](s16)
754    ; VI: G_STORE [[ANYEXT3]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
755    ; GFX9-LABEL: name: test_store_global_s64_align1
756    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
757    ; GFX9: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
758    ; GFX9: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
759    %0:_(p1) = COPY $vgpr0_vgpr1
760    %1:_(s64) = COPY $vgpr2_vgpr3
761    G_STORE %1, %0 :: (store 8, align 1, addrspace 1)
762...
763
764---
765name: test_store_global_s64_align2
766body: |
767  bb.0:
768    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
769
770    ; SI-LABEL: name: test_store_global_s64_align2
771    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
772    ; SI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
773    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
774    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
775    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
776    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
777    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
778    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
779    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
780    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
781    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
782    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
783    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
784    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
785    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
786    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
787    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
788    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
789    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
790    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
791    ; CI-LABEL: name: test_store_global_s64_align2
792    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
793    ; CI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
794    ; CI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
795    ; VI-LABEL: name: test_store_global_s64_align2
796    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
797    ; VI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
798    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
799    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
800    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
801    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
802    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
803    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
804    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
805    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
806    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
807    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
808    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
809    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
810    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
811    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
812    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
813    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
814    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
815    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
816    ; GFX9-LABEL: name: test_store_global_s64_align2
817    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
818    ; GFX9: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
819    ; GFX9: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
820    %0:_(p1) = COPY $vgpr0_vgpr1
821    %1:_(s64) = COPY $vgpr2_vgpr3
822    G_STORE %1, %0 :: (store 8, align 2, addrspace 1)
823...
824
825---
826name: test_store_global_s64_align4
827body: |
828  bb.0:
829    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
830
831    ; SI-LABEL: name: test_store_global_s64_align4
832    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
833    ; SI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
834    ; SI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
835    ; CI-LABEL: name: test_store_global_s64_align4
836    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
837    ; CI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
838    ; CI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
839    ; VI-LABEL: name: test_store_global_s64_align4
840    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
841    ; VI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
842    ; VI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
843    ; GFX9-LABEL: name: test_store_global_s64_align4
844    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
845    ; GFX9: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
846    ; GFX9: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
847    %0:_(p1) = COPY $vgpr0_vgpr1
848    %1:_(s64) = COPY $vgpr2_vgpr3
849    G_STORE %1, %0 :: (store 8, align 4, addrspace 1)
850...
851
852---
853name: test_store_global_s64_align8
854body: |
855  bb.0:
856    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
857
858    ; SI-LABEL: name: test_store_global_s64_align8
859    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
860    ; SI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
861    ; SI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, addrspace 1)
862    ; CI-LABEL: name: test_store_global_s64_align8
863    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
864    ; CI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
865    ; CI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, addrspace 1)
866    ; VI-LABEL: name: test_store_global_s64_align8
867    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
868    ; VI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
869    ; VI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, addrspace 1)
870    ; GFX9-LABEL: name: test_store_global_s64_align8
871    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
872    ; GFX9: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
873    ; GFX9: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, addrspace 1)
874    %0:_(p1) = COPY $vgpr0_vgpr1
875    %1:_(s64) = COPY $vgpr2_vgpr3
876    G_STORE %1, %0 :: (store 8, align 8, addrspace 1)
877...
878
879---
880name: test_store_global_s64_align16
881body: |
882  bb.0:
883    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
884
885    ; SI-LABEL: name: test_store_global_s64_align16
886    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
887    ; SI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
888    ; SI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
889    ; CI-LABEL: name: test_store_global_s64_align16
890    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
891    ; CI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
892    ; CI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
893    ; VI-LABEL: name: test_store_global_s64_align16
894    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
895    ; VI: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
896    ; VI: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
897    ; GFX9-LABEL: name: test_store_global_s64_align16
898    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
899    ; GFX9: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
900    ; GFX9: G_STORE [[COPY1]](s64), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
901    %0:_(p1) = COPY $vgpr0_vgpr1
902    %1:_(s64) = COPY $vgpr2_vgpr3
903    G_STORE %1, %0 :: (store 8, align 16, addrspace 1)
904...
905
906---
907name: test_store_global_p0_align1
908body: |
909  bb.0:
910    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
911
912    ; SI-LABEL: name: test_store_global_p0_align1
913    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
914    ; SI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
915    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](p0)
916    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
917    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
918    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
919    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
920    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
921    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
922    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
923    ; SI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C2]]
924    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY2]](s32)
925    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
926    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
927    ; SI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C2]]
928    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY4]](s32)
929    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
930    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
931    ; SI: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C2]]
932    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[COPY6]](s32)
933    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
934    ; SI: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[C2]]
935    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[C1]](s32)
936    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
937    ; SI: G_STORE [[COPY9]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
938    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
939    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
940    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
941    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
942    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
943    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
944    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
945    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
946    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
947    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
948    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
949    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
950    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
951    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
952    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
953    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
954    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
955    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
956    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
957    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
958    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
959    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
960    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
961    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
962    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
963    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
964    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
965    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
966    ; CI-LABEL: name: test_store_global_p0_align1
967    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
968    ; CI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
969    ; CI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
970    ; VI-LABEL: name: test_store_global_p0_align1
971    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
972    ; VI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
973    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](p0)
974    ; VI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[UV]](s32)
975    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
976    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
977    ; VI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR]](s32)
978    ; VI: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[UV1]](s32)
979    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
980    ; VI: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR1]](s32)
981    ; VI: [[C1:%[0-9]+]]:_(s16) = G_CONSTANT i16 8
982    ; VI: [[LSHR2:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[C1]](s16)
983    ; VI: [[LSHR3:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC1]], [[C1]](s16)
984    ; VI: [[LSHR4:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC2]], [[C1]](s16)
985    ; VI: [[LSHR5:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC3]], [[C1]](s16)
986    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
987    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
988    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
989    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
990    ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR2]](s16)
991    ; VI: G_STORE [[ANYEXT]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
992    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
993    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
994    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
995    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
996    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
997    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
998    ; VI: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR3]](s16)
999    ; VI: G_STORE [[ANYEXT1]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
1000    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1001    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
1002    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1003    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
1004    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
1005    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
1006    ; VI: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR4]](s16)
1007    ; VI: G_STORE [[ANYEXT2]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
1008    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
1009    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
1010    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1011    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
1012    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
1013    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
1014    ; VI: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR5]](s16)
1015    ; VI: G_STORE [[ANYEXT3]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
1016    ; GFX9-LABEL: name: test_store_global_p0_align1
1017    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1018    ; GFX9: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1019    ; GFX9: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
1020    %0:_(p1) = COPY $vgpr0_vgpr1
1021    %1:_(p0) = COPY $vgpr2_vgpr3
1022    G_STORE %1, %0 :: (store 8, align 1, addrspace 1)
1023...
1024
1025---
1026name: test_store_global_p0_align2
1027body: |
1028  bb.0:
1029    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1030
1031    ; SI-LABEL: name: test_store_global_p0_align2
1032    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1033    ; SI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1034    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](p0)
1035    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1036    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1037    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1038    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1039    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
1040    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1041    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1042    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1043    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
1044    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1045    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1046    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1047    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
1048    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
1049    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1050    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1051    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
1052    ; CI-LABEL: name: test_store_global_p0_align2
1053    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1054    ; CI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1055    ; CI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
1056    ; VI-LABEL: name: test_store_global_p0_align2
1057    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1058    ; VI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1059    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](p0)
1060    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1061    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1062    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1063    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1064    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
1065    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1066    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1067    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1068    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
1069    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1070    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1071    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1072    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
1073    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
1074    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1075    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1076    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
1077    ; GFX9-LABEL: name: test_store_global_p0_align2
1078    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1079    ; GFX9: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1080    ; GFX9: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
1081    %0:_(p1) = COPY $vgpr0_vgpr1
1082    %1:_(p0) = COPY $vgpr2_vgpr3
1083    G_STORE %1, %0 :: (store 8, align 2, addrspace 1)
1084...
1085
1086---
1087name: test_store_global_p0_align4
1088body: |
1089  bb.0:
1090    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1091
1092    ; SI-LABEL: name: test_store_global_p0_align4
1093    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1094    ; SI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1095    ; SI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1096    ; CI-LABEL: name: test_store_global_p0_align4
1097    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1098    ; CI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1099    ; CI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1100    ; VI-LABEL: name: test_store_global_p0_align4
1101    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1102    ; VI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1103    ; VI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1104    ; GFX9-LABEL: name: test_store_global_p0_align4
1105    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1106    ; GFX9: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1107    ; GFX9: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1108    %0:_(p1) = COPY $vgpr0_vgpr1
1109    %1:_(p0) = COPY $vgpr2_vgpr3
1110    G_STORE %1, %0 :: (store 8, align 4, addrspace 1)
1111...
1112
1113---
1114name: test_store_global_p0_align8
1115body: |
1116  bb.0:
1117    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1118
1119    ; SI-LABEL: name: test_store_global_p0_align8
1120    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1121    ; SI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1122    ; SI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, addrspace 1)
1123    ; CI-LABEL: name: test_store_global_p0_align8
1124    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1125    ; CI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1126    ; CI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, addrspace 1)
1127    ; VI-LABEL: name: test_store_global_p0_align8
1128    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1129    ; VI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1130    ; VI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, addrspace 1)
1131    ; GFX9-LABEL: name: test_store_global_p0_align8
1132    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1133    ; GFX9: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1134    ; GFX9: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, addrspace 1)
1135    %0:_(p1) = COPY $vgpr0_vgpr1
1136    %1:_(p0) = COPY $vgpr2_vgpr3
1137    G_STORE %1, %0 :: (store 8, align 8, addrspace 1)
1138...
1139
1140---
1141name: test_store_global_p0_align16
1142body: |
1143  bb.0:
1144    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1145
1146    ; SI-LABEL: name: test_store_global_p0_align16
1147    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1148    ; SI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1149    ; SI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1150    ; CI-LABEL: name: test_store_global_p0_align16
1151    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1152    ; CI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1153    ; CI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1154    ; VI-LABEL: name: test_store_global_p0_align16
1155    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1156    ; VI: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1157    ; VI: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1158    ; GFX9-LABEL: name: test_store_global_p0_align16
1159    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1160    ; GFX9: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr2_vgpr3
1161    ; GFX9: G_STORE [[COPY1]](p0), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1162    %0:_(p1) = COPY $vgpr0_vgpr1
1163    %1:_(p0) = COPY $vgpr2_vgpr3
1164    G_STORE %1, %0 :: (store 8, align 16, addrspace 1)
1165...
1166
1167---
1168name: test_store_global_p999_align1
1169body: |
1170  bb.0:
1171    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1172
1173    ; SI-LABEL: name: test_store_global_p999_align1
1174    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1175    ; SI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1176    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](p999)
1177    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1178    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1179    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1180    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1181    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
1182    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1183    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1184    ; SI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C2]]
1185    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY2]](s32)
1186    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
1187    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1188    ; SI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C2]]
1189    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY4]](s32)
1190    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
1191    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1192    ; SI: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C2]]
1193    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[COPY6]](s32)
1194    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1195    ; SI: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[C2]]
1196    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[C1]](s32)
1197    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1198    ; SI: G_STORE [[COPY9]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
1199    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
1200    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1201    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
1202    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
1203    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1204    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
1205    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1206    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
1207    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
1208    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
1209    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
1210    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
1211    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1212    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
1213    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1214    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
1215    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
1216    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
1217    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
1218    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
1219    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
1220    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
1221    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1222    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
1223    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
1224    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
1225    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
1226    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
1227    ; CI-LABEL: name: test_store_global_p999_align1
1228    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1229    ; CI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1230    ; CI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
1231    ; VI-LABEL: name: test_store_global_p999_align1
1232    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1233    ; VI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1234    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](p999)
1235    ; VI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[UV]](s32)
1236    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1237    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1238    ; VI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR]](s32)
1239    ; VI: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[UV1]](s32)
1240    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1241    ; VI: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR1]](s32)
1242    ; VI: [[C1:%[0-9]+]]:_(s16) = G_CONSTANT i16 8
1243    ; VI: [[LSHR2:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[C1]](s16)
1244    ; VI: [[LSHR3:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC1]], [[C1]](s16)
1245    ; VI: [[LSHR4:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC2]], [[C1]](s16)
1246    ; VI: [[LSHR5:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC3]], [[C1]](s16)
1247    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1248    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
1249    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
1250    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1251    ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR2]](s16)
1252    ; VI: G_STORE [[ANYEXT]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
1253    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1254    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1255    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1256    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
1257    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
1258    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
1259    ; VI: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR3]](s16)
1260    ; VI: G_STORE [[ANYEXT1]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
1261    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1262    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
1263    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1264    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
1265    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
1266    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
1267    ; VI: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR4]](s16)
1268    ; VI: G_STORE [[ANYEXT2]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
1269    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
1270    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
1271    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1272    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
1273    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
1274    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
1275    ; VI: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR5]](s16)
1276    ; VI: G_STORE [[ANYEXT3]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
1277    ; GFX9-LABEL: name: test_store_global_p999_align1
1278    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1279    ; GFX9: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1280    ; GFX9: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
1281    %0:_(p1) = COPY $vgpr0_vgpr1
1282    %1:_(p999) = COPY $vgpr2_vgpr3
1283    G_STORE %1, %0 :: (store 8, align 1, addrspace 1)
1284...
1285
1286---
1287name: test_store_global_p999_align2
1288body: |
1289  bb.0:
1290    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1291
1292    ; SI-LABEL: name: test_store_global_p999_align2
1293    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1294    ; SI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1295    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](p999)
1296    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1297    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1298    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1299    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1300    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
1301    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1302    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1303    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1304    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
1305    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1306    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1307    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1308    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
1309    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
1310    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1311    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1312    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
1313    ; CI-LABEL: name: test_store_global_p999_align2
1314    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1315    ; CI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1316    ; CI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
1317    ; VI-LABEL: name: test_store_global_p999_align2
1318    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1319    ; VI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1320    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](p999)
1321    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1322    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1323    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1324    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1325    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
1326    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1327    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1328    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1329    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
1330    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1331    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1332    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1333    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
1334    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
1335    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1336    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1337    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
1338    ; GFX9-LABEL: name: test_store_global_p999_align2
1339    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1340    ; GFX9: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1341    ; GFX9: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
1342    %0:_(p1) = COPY $vgpr0_vgpr1
1343    %1:_(p999) = COPY $vgpr2_vgpr3
1344    G_STORE %1, %0 :: (store 8, align 2, addrspace 1)
1345...
1346
1347---
1348name: test_store_global_p999_align4
1349body: |
1350  bb.0:
1351    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1352
1353    ; SI-LABEL: name: test_store_global_p999_align4
1354    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1355    ; SI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1356    ; SI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1357    ; CI-LABEL: name: test_store_global_p999_align4
1358    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1359    ; CI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1360    ; CI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1361    ; VI-LABEL: name: test_store_global_p999_align4
1362    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1363    ; VI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1364    ; VI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1365    ; GFX9-LABEL: name: test_store_global_p999_align4
1366    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1367    ; GFX9: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1368    ; GFX9: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1369    %0:_(p1) = COPY $vgpr0_vgpr1
1370    %1:_(p999) = COPY $vgpr2_vgpr3
1371    G_STORE %1, %0 :: (store 8, align 4, addrspace 1)
1372...
1373
1374---
1375name: test_store_global_p999_align8
1376body: |
1377  bb.0:
1378    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1379
1380    ; SI-LABEL: name: test_store_global_p999_align8
1381    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1382    ; SI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1383    ; SI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, addrspace 1)
1384    ; CI-LABEL: name: test_store_global_p999_align8
1385    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1386    ; CI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1387    ; CI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, addrspace 1)
1388    ; VI-LABEL: name: test_store_global_p999_align8
1389    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1390    ; VI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1391    ; VI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, addrspace 1)
1392    ; GFX9-LABEL: name: test_store_global_p999_align8
1393    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1394    ; GFX9: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1395    ; GFX9: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, addrspace 1)
1396    %0:_(p1) = COPY $vgpr0_vgpr1
1397    %1:_(p999) = COPY $vgpr2_vgpr3
1398    G_STORE %1, %0 :: (store 8, align 8, addrspace 1)
1399...
1400
1401---
1402name: test_store_global_p999_align16
1403body: |
1404  bb.0:
1405    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1406
1407    ; SI-LABEL: name: test_store_global_p999_align16
1408    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1409    ; SI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1410    ; SI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1411    ; CI-LABEL: name: test_store_global_p999_align16
1412    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1413    ; CI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1414    ; CI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1415    ; VI-LABEL: name: test_store_global_p999_align16
1416    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1417    ; VI: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1418    ; VI: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1419    ; GFX9-LABEL: name: test_store_global_p999_align16
1420    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1421    ; GFX9: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr2_vgpr3
1422    ; GFX9: G_STORE [[COPY1]](p999), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1423    %0:_(p1) = COPY $vgpr0_vgpr1
1424    %1:_(p999) = COPY $vgpr2_vgpr3
1425    G_STORE %1, %0 :: (store 8, align 16, addrspace 1)
1426...
1427
1428---
1429name: test_store_global_v2s32_align1
1430body: |
1431  bb.0:
1432    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1433
1434    ; SI-LABEL: name: test_store_global_v2s32_align1
1435    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1436    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1437    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
1438    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1439    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1440    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1441    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
1442    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
1443    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
1444    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1445    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
1446    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
1447    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1448    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1449    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
1450    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1451    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
1452    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1453    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
1454    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
1455    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
1456    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
1457    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
1458    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1459    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
1460    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1461    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
1462    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
1463    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1464    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
1465    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
1466    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
1467    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
1468    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
1469    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
1470    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
1471    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
1472    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
1473    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
1474    ; CI-LABEL: name: test_store_global_v2s32_align1
1475    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1476    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1477    ; CI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
1478    ; VI-LABEL: name: test_store_global_v2s32_align1
1479    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1480    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1481    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
1482    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1483    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1484    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1485    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
1486    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
1487    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
1488    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1489    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
1490    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
1491    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1492    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1493    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
1494    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1495    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
1496    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1497    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
1498    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
1499    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
1500    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
1501    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
1502    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1503    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
1504    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1505    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
1506    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
1507    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1508    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
1509    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
1510    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
1511    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
1512    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
1513    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
1514    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
1515    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
1516    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
1517    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
1518    ; GFX9-LABEL: name: test_store_global_v2s32_align1
1519    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1520    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1521    ; GFX9: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
1522    %0:_(p1) = COPY $vgpr0_vgpr1
1523    %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
1524    G_STORE %1, %0 :: (store 8, align 1, addrspace 1)
1525...
1526
1527---
1528name: test_store_global_v2s32_align2
1529body: |
1530  bb.0:
1531    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1532
1533    ; SI-LABEL: name: test_store_global_v2s32_align2
1534    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1535    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1536    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
1537    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1538    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1539    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1540    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
1541    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1542    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1543    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1544    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
1545    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1546    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1547    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1548    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1549    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
1550    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
1551    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1552    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
1553    ; CI-LABEL: name: test_store_global_v2s32_align2
1554    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1555    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1556    ; CI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
1557    ; VI-LABEL: name: test_store_global_v2s32_align2
1558    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1559    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1560    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
1561    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1562    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1563    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1564    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
1565    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1566    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1567    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1568    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
1569    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1570    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1571    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1572    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1573    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
1574    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
1575    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1576    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
1577    ; GFX9-LABEL: name: test_store_global_v2s32_align2
1578    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1579    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1580    ; GFX9: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
1581    %0:_(p1) = COPY $vgpr0_vgpr1
1582    %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
1583    G_STORE %1, %0 :: (store 8, align 2, addrspace 1)
1584...
1585
1586---
1587name: test_store_global_v2s32_align4
1588body: |
1589  bb.0:
1590    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1591
1592    ; SI-LABEL: name: test_store_global_v2s32_align4
1593    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1594    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1595    ; SI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1596    ; CI-LABEL: name: test_store_global_v2s32_align4
1597    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1598    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1599    ; CI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1600    ; VI-LABEL: name: test_store_global_v2s32_align4
1601    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1602    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1603    ; VI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1604    ; GFX9-LABEL: name: test_store_global_v2s32_align4
1605    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1606    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1607    ; GFX9: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1608    %0:_(p1) = COPY $vgpr0_vgpr1
1609    %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
1610    G_STORE %1, %0 :: (store 8, align 4, addrspace 1)
1611...
1612
1613---
1614name: test_store_global_v2s32_align8
1615body: |
1616  bb.0:
1617    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1618
1619    ; SI-LABEL: name: test_store_global_v2s32_align8
1620    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1621    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1622    ; SI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, addrspace 1)
1623    ; CI-LABEL: name: test_store_global_v2s32_align8
1624    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1625    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1626    ; CI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, addrspace 1)
1627    ; VI-LABEL: name: test_store_global_v2s32_align8
1628    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1629    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1630    ; VI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, addrspace 1)
1631    ; GFX9-LABEL: name: test_store_global_v2s32_align8
1632    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1633    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1634    ; GFX9: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, addrspace 1)
1635    %0:_(p1) = COPY $vgpr0_vgpr1
1636    %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
1637    G_STORE %1, %0 :: (store 8, align 8, addrspace 1)
1638...
1639
1640---
1641name: test_store_global_v2s32_align16
1642body: |
1643  bb.0:
1644    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1645
1646    ; SI-LABEL: name: test_store_global_v2s32_align16
1647    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1648    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1649    ; SI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1650    ; CI-LABEL: name: test_store_global_v2s32_align16
1651    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1652    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1653    ; CI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1654    ; VI-LABEL: name: test_store_global_v2s32_align16
1655    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1656    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1657    ; VI: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1658    ; GFX9-LABEL: name: test_store_global_v2s32_align16
1659    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1660    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1661    ; GFX9: G_STORE [[COPY1]](<2 x s32>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1662    %0:_(p1) = COPY $vgpr0_vgpr1
1663    %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
1664    G_STORE %1, %0 :: (store 8, align 16, addrspace 1)
1665...
1666
1667---
1668name: test_store_global_v2p3_align1
1669body: |
1670  bb.0:
1671    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1672
1673    ; SI-LABEL: name: test_store_global_v2p3_align1
1674    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1675    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1676    ; SI: [[UV:%[0-9]+]]:_(p3), [[UV1:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[COPY1]](<2 x p3>)
1677    ; SI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV]](p3)
1678    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1679    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
1680    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1681    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C1]](s32)
1682    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
1683    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C2]](s32)
1684    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
1685    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
1686    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
1687    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1688    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1689    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
1690    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1691    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
1692    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1693    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
1694    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
1695    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
1696    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
1697    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
1698    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1699    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
1700    ; SI: [[PTRTOINT1:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV1]](p3)
1701    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C]](s32)
1702    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C1]](s32)
1703    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C2]](s32)
1704    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[PTRTOINT1]](s32)
1705    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
1706    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
1707    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
1708    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
1709    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
1710    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
1711    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
1712    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
1713    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
1714    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
1715    ; CI-LABEL: name: test_store_global_v2p3_align1
1716    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1717    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1718    ; CI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
1719    ; VI-LABEL: name: test_store_global_v2p3_align1
1720    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1721    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1722    ; VI: [[UV:%[0-9]+]]:_(p3), [[UV1:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[COPY1]](<2 x p3>)
1723    ; VI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV]](p3)
1724    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1725    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
1726    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1727    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C1]](s32)
1728    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
1729    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C2]](s32)
1730    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
1731    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
1732    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
1733    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1734    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1735    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
1736    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1737    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
1738    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1739    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
1740    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
1741    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
1742    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
1743    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
1744    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1745    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
1746    ; VI: [[PTRTOINT1:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV1]](p3)
1747    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C]](s32)
1748    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C1]](s32)
1749    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C2]](s32)
1750    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[PTRTOINT1]](s32)
1751    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
1752    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
1753    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
1754    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
1755    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
1756    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
1757    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
1758    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
1759    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
1760    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
1761    ; GFX9-LABEL: name: test_store_global_v2p3_align1
1762    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1763    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1764    ; GFX9: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
1765    %0:_(p1) = COPY $vgpr0_vgpr1
1766    %1:_(<2 x p3>) = COPY $vgpr2_vgpr3
1767    G_STORE %1, %0 :: (store 8, align 1, addrspace 1)
1768...
1769
1770---
1771name: test_store_global_v2p3_align2
1772body: |
1773  bb.0:
1774    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1775
1776    ; SI-LABEL: name: test_store_global_v2p3_align2
1777    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1778    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1779    ; SI: [[UV:%[0-9]+]]:_(p3), [[UV1:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[COPY1]](<2 x p3>)
1780    ; SI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV]](p3)
1781    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1782    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
1783    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
1784    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
1785    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1786    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1787    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1788    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
1789    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1790    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1791    ; SI: [[PTRTOINT1:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV1]](p3)
1792    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C]](s32)
1793    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[PTRTOINT1]](s32)
1794    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
1795    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
1796    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1797    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
1798    ; CI-LABEL: name: test_store_global_v2p3_align2
1799    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1800    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1801    ; CI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
1802    ; VI-LABEL: name: test_store_global_v2p3_align2
1803    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1804    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1805    ; VI: [[UV:%[0-9]+]]:_(p3), [[UV1:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[COPY1]](<2 x p3>)
1806    ; VI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV]](p3)
1807    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1808    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
1809    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
1810    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
1811    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1812    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1813    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1814    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
1815    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1816    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1817    ; VI: [[PTRTOINT1:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV1]](p3)
1818    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C]](s32)
1819    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[PTRTOINT1]](s32)
1820    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
1821    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
1822    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1823    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
1824    ; GFX9-LABEL: name: test_store_global_v2p3_align2
1825    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1826    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1827    ; GFX9: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
1828    %0:_(p1) = COPY $vgpr0_vgpr1
1829    %1:_(<2 x p3>) = COPY $vgpr2_vgpr3
1830    G_STORE %1, %0 :: (store 8, align 2, addrspace 1)
1831...
1832
1833---
1834name: test_store_global_v2p3_align4
1835body: |
1836  bb.0:
1837    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1838
1839    ; SI-LABEL: name: test_store_global_v2p3_align4
1840    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1841    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1842    ; SI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1843    ; CI-LABEL: name: test_store_global_v2p3_align4
1844    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1845    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1846    ; CI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1847    ; VI-LABEL: name: test_store_global_v2p3_align4
1848    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1849    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1850    ; VI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1851    ; GFX9-LABEL: name: test_store_global_v2p3_align4
1852    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1853    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1854    ; GFX9: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
1855    %0:_(p1) = COPY $vgpr0_vgpr1
1856    %1:_(<2 x p3>) = COPY $vgpr2_vgpr3
1857    G_STORE %1, %0 :: (store 8, align 4, addrspace 1)
1858...
1859
1860---
1861name: test_store_global_v2p3_align8
1862body: |
1863  bb.0:
1864    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1865
1866    ; SI-LABEL: name: test_store_global_v2p3_align8
1867    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1868    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1869    ; SI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, addrspace 1)
1870    ; CI-LABEL: name: test_store_global_v2p3_align8
1871    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1872    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1873    ; CI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, addrspace 1)
1874    ; VI-LABEL: name: test_store_global_v2p3_align8
1875    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1876    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1877    ; VI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, addrspace 1)
1878    ; GFX9-LABEL: name: test_store_global_v2p3_align8
1879    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1880    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1881    ; GFX9: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, addrspace 1)
1882    %0:_(p1) = COPY $vgpr0_vgpr1
1883    %1:_(<2 x p3>) = COPY $vgpr2_vgpr3
1884    G_STORE %1, %0 :: (store 8, align 8, addrspace 1)
1885...
1886
1887---
1888name: test_store_global_v2p3_align16
1889body: |
1890  bb.0:
1891    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1892
1893    ; SI-LABEL: name: test_store_global_v2p3_align16
1894    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1895    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1896    ; SI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1897    ; CI-LABEL: name: test_store_global_v2p3_align16
1898    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1899    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1900    ; CI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1901    ; VI-LABEL: name: test_store_global_v2p3_align16
1902    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1903    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1904    ; VI: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1905    ; GFX9-LABEL: name: test_store_global_v2p3_align16
1906    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1907    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
1908    ; GFX9: G_STORE [[COPY1]](<2 x p3>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
1909    %0:_(p1) = COPY $vgpr0_vgpr1
1910    %1:_(<2 x p3>) = COPY $vgpr2_vgpr3
1911    G_STORE %1, %0 :: (store 8, align 16, addrspace 1)
1912...
1913
1914---
1915name: test_store_global_v4s16_align1
1916body: |
1917  bb.0:
1918    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1919
1920    ; SI-LABEL: name: test_store_global_v4s16_align1
1921    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1922    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
1923    ; SI: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
1924    ; SI: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1925    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1926    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
1927    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1928    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1929    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[BITCAST]](s32)
1930    ; SI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C2]]
1931    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C1]](s32)
1932    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[BITCAST]](s32)
1933    ; SI: G_STORE [[COPY3]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
1934    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
1935    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1936    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
1937    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
1938    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1939    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
1940    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
1941    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1942    ; SI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[C2]]
1943    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY5]](s32)
1944    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1945    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
1946    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C3]](s64)
1947    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
1948    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
1949    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
1950    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
1951    ; SI: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1952    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
1953    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
1954    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[BITCAST1]](s32)
1955    ; SI: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY10]], [[C2]]
1956    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[COPY9]](s32)
1957    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[BITCAST1]](s32)
1958    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
1959    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
1960    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
1961    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
1962    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
1963    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
1964    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
1965    ; SI: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY14]], [[C2]]
1966    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[COPY13]](s32)
1967    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
1968    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
1969    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C3]](s64)
1970    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
1971    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
1972    ; CI-LABEL: name: test_store_global_v4s16_align1
1973    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1974    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
1975    ; CI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
1976    ; VI-LABEL: name: test_store_global_v4s16_align1
1977    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1978    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
1979    ; VI: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
1980    ; VI: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1981    ; VI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[BITCAST]](s32)
1982    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1983    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
1984    ; VI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR]](s32)
1985    ; VI: [[C1:%[0-9]+]]:_(s16) = G_CONSTANT i16 8
1986    ; VI: [[LSHR1:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[C1]](s16)
1987    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[BITCAST]](s32)
1988    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
1989    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
1990    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1991    ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR1]](s16)
1992    ; VI: G_STORE [[ANYEXT]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
1993    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
1994    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
1995    ; VI: [[LSHR2:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC1]], [[C1]](s16)
1996    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
1997    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
1998    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C2]](s64)
1999    ; VI: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR2]](s16)
2000    ; VI: G_STORE [[ANYEXT1]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
2001    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2002    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
2003    ; VI: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
2004    ; VI: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[BITCAST1]](s32)
2005    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
2006    ; VI: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR3]](s32)
2007    ; VI: [[LSHR4:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC2]], [[C1]](s16)
2008    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[BITCAST1]](s32)
2009    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
2010    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
2011    ; VI: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR4]](s16)
2012    ; VI: G_STORE [[ANYEXT2]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
2013    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
2014    ; VI: [[LSHR5:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC3]], [[C1]](s16)
2015    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
2016    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
2017    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C2]](s64)
2018    ; VI: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR5]](s16)
2019    ; VI: G_STORE [[ANYEXT3]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
2020    ; GFX9-LABEL: name: test_store_global_v4s16_align1
2021    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2022    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2023    ; GFX9: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 1, addrspace 1)
2024    %0:_(p1) = COPY $vgpr0_vgpr1
2025    %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
2026    G_STORE %1, %0 :: (store 8, align 1, addrspace 1)
2027...
2028
2029---
2030name: test_store_global_v4s16_align2
2031body: |
2032  bb.0:
2033    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
2034
2035    ; SI-LABEL: name: test_store_global_v4s16_align2
2036    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2037    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2038    ; SI: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
2039    ; SI: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
2040    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2041    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
2042    ; SI: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
2043    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
2044    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[BITCAST]](s32)
2045    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
2046    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2047    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
2048    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2049    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
2050    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2051    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
2052    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[BITCAST1]](s32)
2053    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
2054    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
2055    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2056    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2057    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
2058    ; CI-LABEL: name: test_store_global_v4s16_align2
2059    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2060    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2061    ; CI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
2062    ; VI-LABEL: name: test_store_global_v4s16_align2
2063    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2064    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2065    ; VI: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
2066    ; VI: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
2067    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2068    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
2069    ; VI: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
2070    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
2071    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[BITCAST]](s32)
2072    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
2073    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2074    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
2075    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2076    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
2077    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2078    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
2079    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[BITCAST1]](s32)
2080    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
2081    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
2082    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2083    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2084    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
2085    ; GFX9-LABEL: name: test_store_global_v4s16_align2
2086    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2087    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2088    ; GFX9: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 2, addrspace 1)
2089    %0:_(p1) = COPY $vgpr0_vgpr1
2090    %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
2091    G_STORE %1, %0 :: (store 8, align 2, addrspace 1)
2092...
2093
2094---
2095name: test_store_global_v4s16_align4
2096body: |
2097  bb.0:
2098    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
2099
2100    ; SI-LABEL: name: test_store_global_v4s16_align4
2101    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2102    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2103    ; SI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
2104    ; CI-LABEL: name: test_store_global_v4s16_align4
2105    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2106    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2107    ; CI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
2108    ; VI-LABEL: name: test_store_global_v4s16_align4
2109    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2110    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2111    ; VI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
2112    ; GFX9-LABEL: name: test_store_global_v4s16_align4
2113    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2114    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2115    ; GFX9: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
2116    %0:_(p1) = COPY $vgpr0_vgpr1
2117    %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
2118    G_STORE %1, %0 :: (store 8, align 4, addrspace 1)
2119...
2120
2121---
2122name: test_store_global_v4s16_align8
2123body: |
2124  bb.0:
2125    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
2126
2127    ; SI-LABEL: name: test_store_global_v4s16_align8
2128    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2129    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2130    ; SI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, addrspace 1)
2131    ; CI-LABEL: name: test_store_global_v4s16_align8
2132    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2133    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2134    ; CI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, addrspace 1)
2135    ; VI-LABEL: name: test_store_global_v4s16_align8
2136    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2137    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2138    ; VI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, addrspace 1)
2139    ; GFX9-LABEL: name: test_store_global_v4s16_align8
2140    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2141    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2142    ; GFX9: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, addrspace 1)
2143    %0:_(p1) = COPY $vgpr0_vgpr1
2144    %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
2145    G_STORE %1, %0 :: (store 8, align 8, addrspace 1)
2146...
2147
2148---
2149name: test_store_global_v4s16_align16
2150body: |
2151  bb.0:
2152    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
2153
2154    ; SI-LABEL: name: test_store_global_v4s16_align16
2155    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2156    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2157    ; SI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
2158    ; CI-LABEL: name: test_store_global_v4s16_align16
2159    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2160    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2161    ; CI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
2162    ; VI-LABEL: name: test_store_global_v4s16_align16
2163    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2164    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2165    ; VI: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
2166    ; GFX9-LABEL: name: test_store_global_v4s16_align16
2167    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2168    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
2169    ; GFX9: G_STORE [[COPY1]](<4 x s16>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
2170    %0:_(p1) = COPY $vgpr0_vgpr1
2171    %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
2172    G_STORE %1, %0 :: (store 8, align 16, addrspace 1)
2173...
2174
2175---
2176name: test_store_global_v3s32_align1
2177body: |
2178  bb.0:
2179    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
2180
2181    ; SI-LABEL: name: test_store_global_v3s32_align1
2182    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2183    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2184    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY1]](<3 x s32>), 0
2185    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<3 x s32>), 64
2186    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<2 x s32>)
2187    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
2188    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
2189    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2190    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
2191    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
2192    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
2193    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
2194    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
2195    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
2196    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2197    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2198    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
2199    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2200    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
2201    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2202    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
2203    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
2204    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
2205    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
2206    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
2207    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2208    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
2209    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
2210    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
2211    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
2212    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
2213    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
2214    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
2215    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
2216    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
2217    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
2218    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
2219    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
2220    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
2221    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
2222    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
2223    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2224    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
2225    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
2226    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
2227    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
2228    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
2229    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
2230    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
2231    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
2232    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
2233    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
2234    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
2235    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
2236    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
2237    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
2238    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
2239    ; CI-LABEL: name: test_store_global_v3s32_align1
2240    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2241    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2242    ; CI: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 1, addrspace 1)
2243    ; VI-LABEL: name: test_store_global_v3s32_align1
2244    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2245    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2246    ; VI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY1]](<3 x s32>), 0
2247    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<3 x s32>), 64
2248    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<2 x s32>)
2249    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
2250    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
2251    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2252    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
2253    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
2254    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
2255    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
2256    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
2257    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
2258    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2259    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2260    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
2261    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2262    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
2263    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2264    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
2265    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
2266    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
2267    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
2268    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
2269    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2270    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
2271    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
2272    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
2273    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
2274    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
2275    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
2276    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
2277    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
2278    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
2279    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
2280    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
2281    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
2282    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
2283    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
2284    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
2285    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2286    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
2287    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
2288    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
2289    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
2290    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
2291    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
2292    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
2293    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
2294    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
2295    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
2296    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
2297    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
2298    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
2299    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
2300    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
2301    ; GFX9-LABEL: name: test_store_global_v3s32_align1
2302    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2303    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2304    ; GFX9: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 1, addrspace 1)
2305    %0:_(p1) = COPY $vgpr0_vgpr1
2306    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2307    G_STORE %1, %0 :: (store 12, align 1, addrspace 1)
2308...
2309
2310---
2311name: test_store_global_v3s32_align2
2312body: |
2313  bb.0:
2314    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
2315
2316    ; SI-LABEL: name: test_store_global_v3s32_align2
2317    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2318    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2319    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY1]](<3 x s32>), 0
2320    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<3 x s32>), 64
2321    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<2 x s32>)
2322    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2323    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
2324    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
2325    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
2326    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2327    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
2328    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2329    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
2330    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2331    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
2332    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
2333    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
2334    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
2335    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
2336    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2337    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
2338    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2339    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2340    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
2341    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
2342    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
2343    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
2344    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
2345    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
2346    ; CI-LABEL: name: test_store_global_v3s32_align2
2347    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2348    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2349    ; CI: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 2, addrspace 1)
2350    ; VI-LABEL: name: test_store_global_v3s32_align2
2351    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2352    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2353    ; VI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY1]](<3 x s32>), 0
2354    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<3 x s32>), 64
2355    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<2 x s32>)
2356    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2357    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
2358    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
2359    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
2360    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2361    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
2362    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2363    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
2364    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2365    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
2366    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
2367    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
2368    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
2369    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
2370    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2371    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
2372    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2373    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2374    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
2375    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
2376    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
2377    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
2378    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
2379    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
2380    ; GFX9-LABEL: name: test_store_global_v3s32_align2
2381    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2382    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2383    ; GFX9: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 2, addrspace 1)
2384    %0:_(p1) = COPY $vgpr0_vgpr1
2385    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2386    G_STORE %1, %0 :: (store 12, align 2, addrspace 1)
2387...
2388
2389---
2390name: test_store_global_v3s32_align4
2391body: |
2392  bb.0:
2393    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
2394
2395    ; SI-LABEL: name: test_store_global_v3s32_align4
2396    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2397    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2398    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY1]](<3 x s32>), 0
2399    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<3 x s32>), 64
2400    ; SI: G_STORE [[EXTRACT]](<2 x s32>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
2401    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2402    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
2403    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 8, addrspace 1)
2404    ; CI-LABEL: name: test_store_global_v3s32_align4
2405    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2406    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2407    ; CI: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 4, addrspace 1)
2408    ; VI-LABEL: name: test_store_global_v3s32_align4
2409    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2410    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2411    ; VI: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 4, addrspace 1)
2412    ; GFX9-LABEL: name: test_store_global_v3s32_align4
2413    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2414    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2415    ; GFX9: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 4, addrspace 1)
2416    %0:_(p1) = COPY $vgpr0_vgpr1
2417    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2418    G_STORE %1, %0 :: (store 12, align 4, addrspace 1)
2419...
2420
2421---
2422name: test_store_global_v3s32_align8
2423body: |
2424  bb.0:
2425    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
2426
2427    ; SI-LABEL: name: test_store_global_v3s32_align8
2428    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2429    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2430    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY1]](<3 x s32>), 0
2431    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<3 x s32>), 64
2432    ; SI: G_STORE [[EXTRACT]](<2 x s32>), [[COPY]](p1) :: (store 8, addrspace 1)
2433    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2434    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
2435    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 8, align 8, addrspace 1)
2436    ; CI-LABEL: name: test_store_global_v3s32_align8
2437    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2438    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2439    ; CI: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 8, addrspace 1)
2440    ; VI-LABEL: name: test_store_global_v3s32_align8
2441    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2442    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2443    ; VI: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 8, addrspace 1)
2444    ; GFX9-LABEL: name: test_store_global_v3s32_align8
2445    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2446    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2447    ; GFX9: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 8, addrspace 1)
2448    %0:_(p1) = COPY $vgpr0_vgpr1
2449    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2450    G_STORE %1, %0 :: (store 12, align 8, addrspace 1)
2451...
2452
2453---
2454name: test_store_global_v3s32_align16
2455body: |
2456  bb.0:
2457    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
2458
2459    ; SI-LABEL: name: test_store_global_v3s32_align16
2460    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2461    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2462    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY1]](<3 x s32>), 0
2463    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<3 x s32>), 64
2464    ; SI: G_STORE [[EXTRACT]](<2 x s32>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
2465    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2466    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
2467    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 8, align 8, addrspace 1)
2468    ; CI-LABEL: name: test_store_global_v3s32_align16
2469    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2470    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2471    ; CI: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 16, addrspace 1)
2472    ; VI-LABEL: name: test_store_global_v3s32_align16
2473    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2474    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2475    ; VI: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 16, addrspace 1)
2476    ; GFX9-LABEL: name: test_store_global_v3s32_align16
2477    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2478    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2479    ; GFX9: G_STORE [[COPY1]](<3 x s32>), [[COPY]](p1) :: (store 12, align 16, addrspace 1)
2480    %0:_(p1) = COPY $vgpr0_vgpr1
2481    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
2482    G_STORE %1, %0 :: (store 12, align 16, addrspace 1)
2483...
2484
2485---
2486name: test_store_global_v4s32_align1
2487body: |
2488  bb.0:
2489    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
2490
2491    ; SI-LABEL: name: test_store_global_v4s32_align1
2492    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2493    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2494    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<4 x s32>)
2495    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
2496    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
2497    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2498    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
2499    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
2500    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
2501    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
2502    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
2503    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
2504    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2505    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2506    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
2507    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2508    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
2509    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2510    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
2511    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
2512    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
2513    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
2514    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
2515    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2516    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
2517    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
2518    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
2519    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
2520    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
2521    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
2522    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
2523    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
2524    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
2525    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
2526    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
2527    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
2528    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
2529    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
2530    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
2531    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2532    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
2533    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
2534    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
2535    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
2536    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
2537    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
2538    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
2539    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
2540    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
2541    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
2542    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
2543    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
2544    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
2545    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
2546    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
2547    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
2548    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
2549    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
2550    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
2551    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
2552    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
2553    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
2554    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
2555    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
2556    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
2557    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
2558    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
2559    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
2560    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
2561    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
2562    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
2563    ; CI-LABEL: name: test_store_global_v4s32_align1
2564    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2565    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2566    ; CI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
2567    ; VI-LABEL: name: test_store_global_v4s32_align1
2568    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2569    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2570    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<4 x s32>)
2571    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
2572    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
2573    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2574    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
2575    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
2576    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
2577    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
2578    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
2579    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
2580    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2581    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2582    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
2583    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2584    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
2585    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2586    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
2587    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
2588    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
2589    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
2590    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
2591    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2592    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
2593    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
2594    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
2595    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
2596    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
2597    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
2598    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
2599    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
2600    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
2601    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
2602    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
2603    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
2604    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
2605    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
2606    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
2607    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2608    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
2609    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
2610    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
2611    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
2612    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
2613    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
2614    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
2615    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
2616    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
2617    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
2618    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
2619    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
2620    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
2621    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
2622    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
2623    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
2624    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
2625    ; VI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
2626    ; VI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
2627    ; VI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
2628    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
2629    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
2630    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
2631    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
2632    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
2633    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
2634    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
2635    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
2636    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
2637    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
2638    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
2639    ; GFX9-LABEL: name: test_store_global_v4s32_align1
2640    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2641    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2642    ; GFX9: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
2643    %0:_(p1) = COPY $vgpr0_vgpr1
2644    %1:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2645    G_STORE %1, %0 :: (store 16, align 1, addrspace 1)
2646...
2647
2648---
2649name: test_store_global_v4s32_align2
2650body: |
2651  bb.0:
2652    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
2653
2654    ; SI-LABEL: name: test_store_global_v4s32_align2
2655    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2656    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2657    ; SI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[COPY1]](<4 x s32>)
2658    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
2659    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2660    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
2661    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
2662    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
2663    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2664    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
2665    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2666    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
2667    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2668    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
2669    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
2670    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
2671    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
2672    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
2673    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2674    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
2675    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2676    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2677    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
2678    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
2679    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
2680    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
2681    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
2682    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
2683    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
2684    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
2685    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
2686    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
2687    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
2688    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
2689    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
2690    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
2691    ; CI-LABEL: name: test_store_global_v4s32_align2
2692    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2693    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2694    ; CI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
2695    ; VI-LABEL: name: test_store_global_v4s32_align2
2696    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2697    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2698    ; VI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[COPY1]](<4 x s32>)
2699    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
2700    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2701    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
2702    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
2703    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
2704    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2705    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
2706    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2707    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
2708    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2709    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
2710    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
2711    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
2712    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
2713    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
2714    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2715    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
2716    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2717    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2718    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
2719    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
2720    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
2721    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
2722    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
2723    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
2724    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
2725    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
2726    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
2727    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
2728    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
2729    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
2730    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
2731    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
2732    ; GFX9-LABEL: name: test_store_global_v4s32_align2
2733    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2734    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2735    ; GFX9: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
2736    %0:_(p1) = COPY $vgpr0_vgpr1
2737    %1:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2738    G_STORE %1, %0 :: (store 16, align 2, addrspace 1)
2739...
2740
2741---
2742name: test_store_global_v4s32_align4
2743body: |
2744  bb.0:
2745    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
2746
2747    ; SI-LABEL: name: test_store_global_v4s32_align4
2748    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2749    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2750    ; SI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
2751    ; CI-LABEL: name: test_store_global_v4s32_align4
2752    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2753    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2754    ; CI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
2755    ; VI-LABEL: name: test_store_global_v4s32_align4
2756    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2757    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2758    ; VI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
2759    ; GFX9-LABEL: name: test_store_global_v4s32_align4
2760    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2761    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2762    ; GFX9: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
2763    %0:_(p1) = COPY $vgpr0_vgpr1
2764    %1:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2765    G_STORE %1, %0 :: (store 16, align 4, addrspace 1)
2766...
2767
2768---
2769name: test_store_global_v4s32_align8
2770body: |
2771  bb.0:
2772    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
2773
2774    ; SI-LABEL: name: test_store_global_v4s32_align8
2775    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2776    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2777    ; SI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
2778    ; CI-LABEL: name: test_store_global_v4s32_align8
2779    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2780    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2781    ; CI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
2782    ; VI-LABEL: name: test_store_global_v4s32_align8
2783    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2784    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2785    ; VI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
2786    ; GFX9-LABEL: name: test_store_global_v4s32_align8
2787    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2788    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2789    ; GFX9: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
2790    %0:_(p1) = COPY $vgpr0_vgpr1
2791    %1:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2792    G_STORE %1, %0 :: (store 16, align 8, addrspace 1)
2793...
2794
2795---
2796name: test_store_global_v4s32_align16
2797body: |
2798  bb.0:
2799    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
2800
2801    ; SI-LABEL: name: test_store_global_v4s32_align16
2802    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2803    ; SI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2804    ; SI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
2805    ; CI-LABEL: name: test_store_global_v4s32_align16
2806    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2807    ; CI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2808    ; CI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
2809    ; VI-LABEL: name: test_store_global_v4s32_align16
2810    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2811    ; VI: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2812    ; VI: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
2813    ; GFX9-LABEL: name: test_store_global_v4s32_align16
2814    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2815    ; GFX9: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2816    ; GFX9: G_STORE [[COPY1]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
2817    %0:_(p1) = COPY $vgpr0_vgpr1
2818    %1:_(<4 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2819    G_STORE %1, %0 :: (store 16, align 16, addrspace 1)
2820...
2821
2822---
2823name: test_store_global_v2s64_align1
2824body: |
2825  bb.0:
2826    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
2827
2828    ; SI-LABEL: name: test_store_global_v2s64_align1
2829    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2830    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2831    ; SI: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>)
2832    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](s64)
2833    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2834    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
2835    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
2836    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
2837    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
2838    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
2839    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
2840    ; SI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C2]]
2841    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY2]](s32)
2842    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
2843    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2844    ; SI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C2]]
2845    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY4]](s32)
2846    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
2847    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
2848    ; SI: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C2]]
2849    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[COPY6]](s32)
2850    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2851    ; SI: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[C2]]
2852    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[C1]](s32)
2853    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
2854    ; SI: G_STORE [[COPY9]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
2855    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
2856    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2857    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
2858    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
2859    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2860    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
2861    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2862    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
2863    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
2864    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
2865    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
2866    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
2867    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2868    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
2869    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
2870    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
2871    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
2872    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
2873    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
2874    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
2875    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
2876    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
2877    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2878    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
2879    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
2880    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
2881    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
2882    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
2883    ; SI: [[C10:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2884    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C10]](s64)
2885    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](s64)
2886    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
2887    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
2888    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
2889    ; SI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
2890    ; SI: [[AND4:%[0-9]+]]:_(s32) = G_AND [[COPY18]], [[C2]]
2891    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[AND4]], [[COPY17]](s32)
2892    ; SI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
2893    ; SI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
2894    ; SI: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY20]], [[C2]]
2895    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[AND5]], [[COPY19]](s32)
2896    ; SI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
2897    ; SI: [[COPY22:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
2898    ; SI: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY22]], [[C2]]
2899    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[AND6]], [[COPY21]](s32)
2900    ; SI: [[COPY23:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
2901    ; SI: [[COPY24:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
2902    ; SI: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY24]], [[C2]]
2903    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[AND7]], [[COPY23]](s32)
2904    ; SI: [[COPY25:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
2905    ; SI: G_STORE [[COPY25]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
2906    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
2907    ; SI: [[COPY26:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
2908    ; SI: G_STORE [[COPY26]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
2909    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
2910    ; SI: [[COPY27:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
2911    ; SI: G_STORE [[COPY27]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
2912    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
2913    ; SI: [[COPY28:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
2914    ; SI: G_STORE [[COPY28]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
2915    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C6]](s64)
2916    ; SI: [[COPY29:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
2917    ; SI: G_STORE [[COPY29]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
2918    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C7]](s64)
2919    ; SI: [[COPY30:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
2920    ; SI: G_STORE [[COPY30]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
2921    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C8]](s64)
2922    ; SI: [[COPY31:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
2923    ; SI: G_STORE [[COPY31]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
2924    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C9]](s64)
2925    ; SI: [[COPY32:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
2926    ; SI: G_STORE [[COPY32]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
2927    ; CI-LABEL: name: test_store_global_v2s64_align1
2928    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2929    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2930    ; CI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
2931    ; VI-LABEL: name: test_store_global_v2s64_align1
2932    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
2933    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
2934    ; VI: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>)
2935    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](s64)
2936    ; VI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[UV2]](s32)
2937    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
2938    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
2939    ; VI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR]](s32)
2940    ; VI: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[UV3]](s32)
2941    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
2942    ; VI: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR1]](s32)
2943    ; VI: [[C1:%[0-9]+]]:_(s16) = G_CONSTANT i16 8
2944    ; VI: [[LSHR2:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[C1]](s16)
2945    ; VI: [[LSHR3:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC1]], [[C1]](s16)
2946    ; VI: [[LSHR4:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC2]], [[C1]](s16)
2947    ; VI: [[LSHR5:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC3]], [[C1]](s16)
2948    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
2949    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
2950    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
2951    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
2952    ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR2]](s16)
2953    ; VI: G_STORE [[ANYEXT]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
2954    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
2955    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
2956    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
2957    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
2958    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
2959    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
2960    ; VI: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR3]](s16)
2961    ; VI: G_STORE [[ANYEXT1]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
2962    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
2963    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
2964    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
2965    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
2966    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
2967    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
2968    ; VI: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR4]](s16)
2969    ; VI: G_STORE [[ANYEXT2]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
2970    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
2971    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
2972    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
2973    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
2974    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
2975    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
2976    ; VI: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR5]](s16)
2977    ; VI: G_STORE [[ANYEXT3]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
2978    ; VI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
2979    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
2980    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](s64)
2981    ; VI: [[TRUNC4:%[0-9]+]]:_(s16) = G_TRUNC [[UV4]](s32)
2982    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
2983    ; VI: [[TRUNC5:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR6]](s32)
2984    ; VI: [[TRUNC6:%[0-9]+]]:_(s16) = G_TRUNC [[UV5]](s32)
2985    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
2986    ; VI: [[TRUNC7:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR7]](s32)
2987    ; VI: [[LSHR8:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC4]], [[C1]](s16)
2988    ; VI: [[LSHR9:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC5]], [[C1]](s16)
2989    ; VI: [[LSHR10:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC6]], [[C1]](s16)
2990    ; VI: [[LSHR11:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC7]], [[C1]](s16)
2991    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
2992    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
2993    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C2]](s64)
2994    ; VI: [[ANYEXT4:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR8]](s16)
2995    ; VI: G_STORE [[ANYEXT4]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
2996    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
2997    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
2998    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
2999    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
3000    ; VI: [[ANYEXT5:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR9]](s16)
3001    ; VI: G_STORE [[ANYEXT5]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
3002    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
3003    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3004    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
3005    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C6]](s64)
3006    ; VI: [[ANYEXT6:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR10]](s16)
3007    ; VI: G_STORE [[ANYEXT6]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
3008    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C7]](s64)
3009    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
3010    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
3011    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C8]](s64)
3012    ; VI: [[ANYEXT7:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR11]](s16)
3013    ; VI: G_STORE [[ANYEXT7]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
3014    ; GFX9-LABEL: name: test_store_global_v2s64_align1
3015    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3016    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3017    ; GFX9: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
3018    %0:_(p1) = COPY $vgpr0_vgpr1
3019    %1:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3020    G_STORE %1, %0 :: (store 16, align 1, addrspace 1)
3021...
3022
3023---
3024name: test_store_global_v2s64_align2
3025body: |
3026  bb.0:
3027    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3028
3029    ; SI-LABEL: name: test_store_global_v2s64_align2
3030    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3031    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3032    ; SI: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>)
3033    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](s64)
3034    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3035    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3036    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3037    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3038    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
3039    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3040    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
3041    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3042    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
3043    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3044    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
3045    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3046    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
3047    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
3048    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3049    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3050    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
3051    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3052    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
3053    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](s64)
3054    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
3055    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
3056    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
3057    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
3058    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
3059    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3060    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
3061    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
3062    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3063    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
3064    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
3065    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3066    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
3067    ; CI-LABEL: name: test_store_global_v2s64_align2
3068    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3069    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3070    ; CI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
3071    ; VI-LABEL: name: test_store_global_v2s64_align2
3072    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3073    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3074    ; VI: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>)
3075    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](s64)
3076    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3077    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3078    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3079    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3080    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
3081    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3082    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
3083    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3084    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
3085    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3086    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
3087    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3088    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
3089    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
3090    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3091    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3092    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
3093    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3094    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
3095    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](s64)
3096    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
3097    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
3098    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
3099    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
3100    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
3101    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3102    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
3103    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
3104    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3105    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
3106    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
3107    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3108    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
3109    ; GFX9-LABEL: name: test_store_global_v2s64_align2
3110    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3111    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3112    ; GFX9: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
3113    %0:_(p1) = COPY $vgpr0_vgpr1
3114    %1:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3115    G_STORE %1, %0 :: (store 16, align 2, addrspace 1)
3116...
3117
3118---
3119name: test_store_global_v2s64_align4
3120body: |
3121  bb.0:
3122    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3123
3124    ; SI-LABEL: name: test_store_global_v2s64_align4
3125    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3126    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3127    ; SI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3128    ; CI-LABEL: name: test_store_global_v2s64_align4
3129    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3130    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3131    ; CI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3132    ; VI-LABEL: name: test_store_global_v2s64_align4
3133    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3134    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3135    ; VI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3136    ; GFX9-LABEL: name: test_store_global_v2s64_align4
3137    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3138    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3139    ; GFX9: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3140    %0:_(p1) = COPY $vgpr0_vgpr1
3141    %1:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3142    G_STORE %1, %0 :: (store 16, align 4, addrspace 1)
3143...
3144
3145---
3146name: test_store_global_v2s64_align8
3147body: |
3148  bb.0:
3149    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3150
3151    ; SI-LABEL: name: test_store_global_v2s64_align8
3152    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3153    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3154    ; SI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3155    ; CI-LABEL: name: test_store_global_v2s64_align8
3156    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3157    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3158    ; CI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3159    ; VI-LABEL: name: test_store_global_v2s64_align8
3160    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3161    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3162    ; VI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3163    ; GFX9-LABEL: name: test_store_global_v2s64_align8
3164    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3165    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3166    ; GFX9: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3167    %0:_(p1) = COPY $vgpr0_vgpr1
3168    %1:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3169    G_STORE %1, %0 :: (store 16, align 8, addrspace 1)
3170...
3171
3172---
3173name: test_store_global_v2s64_align16
3174body: |
3175  bb.0:
3176    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3177
3178    ; SI-LABEL: name: test_store_global_v2s64_align16
3179    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3180    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3181    ; SI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, addrspace 1)
3182    ; CI-LABEL: name: test_store_global_v2s64_align16
3183    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3184    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3185    ; CI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, addrspace 1)
3186    ; VI-LABEL: name: test_store_global_v2s64_align16
3187    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3188    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3189    ; VI: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, addrspace 1)
3190    ; GFX9-LABEL: name: test_store_global_v2s64_align16
3191    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3192    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3193    ; GFX9: G_STORE [[COPY1]](<2 x s64>), [[COPY]](p1) :: (store 16, addrspace 1)
3194    %0:_(p1) = COPY $vgpr0_vgpr1
3195    %1:_(<2 x s64>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3196    G_STORE %1, %0 :: (store 16, align 16, addrspace 1)
3197...
3198
3199---
3200name: test_store_global_v8s16_align1
3201body: |
3202  bb.0:
3203    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3204
3205    ; SI-LABEL: name: test_store_global_v8s16_align1
3206    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3207    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3208    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3209    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[BITCAST]](<4 x s32>)
3210    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
3211    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
3212    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3213    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
3214    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
3215    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
3216    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
3217    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
3218    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
3219    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3220    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3221    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
3222    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3223    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
3224    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3225    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
3226    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
3227    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
3228    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3229    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
3230    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3231    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
3232    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
3233    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
3234    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
3235    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
3236    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
3237    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
3238    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3239    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
3240    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
3241    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
3242    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
3243    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
3244    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
3245    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
3246    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3247    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
3248    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3249    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
3250    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
3251    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3252    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
3253    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
3254    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
3255    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
3256    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
3257    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
3258    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
3259    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
3260    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
3261    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
3262    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
3263    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
3264    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3265    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
3266    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
3267    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3268    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
3269    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
3270    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
3271    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
3272    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
3273    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
3274    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
3275    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
3276    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
3277    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
3278    ; CI-LABEL: name: test_store_global_v8s16_align1
3279    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3280    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3281    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3282    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
3283    ; VI-LABEL: name: test_store_global_v8s16_align1
3284    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3285    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3286    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3287    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[BITCAST]](<4 x s32>)
3288    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
3289    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
3290    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3291    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
3292    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
3293    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
3294    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
3295    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
3296    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
3297    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3298    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3299    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
3300    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3301    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
3302    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3303    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
3304    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
3305    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
3306    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3307    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
3308    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3309    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
3310    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
3311    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
3312    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
3313    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
3314    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
3315    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
3316    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3317    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
3318    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
3319    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
3320    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
3321    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
3322    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
3323    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
3324    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3325    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
3326    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3327    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
3328    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
3329    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3330    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
3331    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
3332    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
3333    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
3334    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
3335    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
3336    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
3337    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
3338    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
3339    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
3340    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
3341    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
3342    ; VI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3343    ; VI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
3344    ; VI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
3345    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3346    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
3347    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
3348    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
3349    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
3350    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
3351    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
3352    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
3353    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
3354    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
3355    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
3356    ; GFX9-LABEL: name: test_store_global_v8s16_align1
3357    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3358    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3359    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3360    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
3361    %0:_(p1) = COPY $vgpr0_vgpr1
3362    %1:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3363    G_STORE %1, %0 :: (store 16, align 1, addrspace 1)
3364...
3365
3366---
3367name: test_store_global_v8s16_align2
3368body: |
3369  bb.0:
3370    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3371
3372    ; SI-LABEL: name: test_store_global_v8s16_align2
3373    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3374    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3375    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3376    ; SI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<4 x s32>)
3377    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
3378    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3379    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3380    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3381    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
3382    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3383    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
3384    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3385    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
3386    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3387    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
3388    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3389    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3390    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
3391    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
3392    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3393    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
3394    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3395    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3396    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
3397    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
3398    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
3399    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
3400    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
3401    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3402    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
3403    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
3404    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
3405    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3406    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
3407    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
3408    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3409    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
3410    ; CI-LABEL: name: test_store_global_v8s16_align2
3411    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3412    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3413    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3414    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
3415    ; VI-LABEL: name: test_store_global_v8s16_align2
3416    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3417    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3418    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3419    ; VI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<4 x s32>)
3420    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
3421    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3422    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3423    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3424    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
3425    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3426    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
3427    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3428    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
3429    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3430    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
3431    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3432    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3433    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
3434    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
3435    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3436    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
3437    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3438    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3439    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
3440    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
3441    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
3442    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
3443    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
3444    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3445    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
3446    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
3447    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
3448    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3449    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
3450    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
3451    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3452    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
3453    ; GFX9-LABEL: name: test_store_global_v8s16_align2
3454    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3455    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3456    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3457    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
3458    %0:_(p1) = COPY $vgpr0_vgpr1
3459    %1:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3460    G_STORE %1, %0 :: (store 16, align 2, addrspace 1)
3461...
3462
3463---
3464name: test_store_global_v8s16_align4
3465body: |
3466  bb.0:
3467    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3468
3469    ; SI-LABEL: name: test_store_global_v8s16_align4
3470    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3471    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3472    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3473    ; SI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3474    ; CI-LABEL: name: test_store_global_v8s16_align4
3475    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3476    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3477    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3478    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3479    ; VI-LABEL: name: test_store_global_v8s16_align4
3480    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3481    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3482    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3483    ; VI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3484    ; GFX9-LABEL: name: test_store_global_v8s16_align4
3485    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3486    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3487    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3488    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3489    %0:_(p1) = COPY $vgpr0_vgpr1
3490    %1:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3491    G_STORE %1, %0 :: (store 16, align 4, addrspace 1)
3492...
3493
3494---
3495name: test_store_global_v8s16_align8
3496body: |
3497  bb.0:
3498    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3499
3500    ; SI-LABEL: name: test_store_global_v8s16_align8
3501    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3502    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3503    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3504    ; SI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3505    ; CI-LABEL: name: test_store_global_v8s16_align8
3506    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3507    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3508    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3509    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3510    ; VI-LABEL: name: test_store_global_v8s16_align8
3511    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3512    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3513    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3514    ; VI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3515    ; GFX9-LABEL: name: test_store_global_v8s16_align8
3516    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3517    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3518    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3519    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3520    %0:_(p1) = COPY $vgpr0_vgpr1
3521    %1:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3522    G_STORE %1, %0 :: (store 16, align 8, addrspace 1)
3523...
3524
3525---
3526name: test_store_global_v8s16_align16
3527body: |
3528  bb.0:
3529    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3530
3531    ; SI-LABEL: name: test_store_global_v8s16_align16
3532    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3533    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3534    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3535    ; SI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
3536    ; CI-LABEL: name: test_store_global_v8s16_align16
3537    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3538    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3539    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3540    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
3541    ; VI-LABEL: name: test_store_global_v8s16_align16
3542    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3543    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3544    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3545    ; VI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
3546    ; GFX9-LABEL: name: test_store_global_v8s16_align16
3547    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3548    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3549    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<8 x s16>)
3550    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
3551    %0:_(p1) = COPY $vgpr0_vgpr1
3552    %1:_(<8 x s16>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3553    G_STORE %1, %0 :: (store 16, align 16, addrspace 1)
3554...
3555
3556---
3557name: test_store_global_v2p0_align1
3558body: |
3559  bb.0:
3560    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3561
3562    ; SI-LABEL: name: test_store_global_v2p0_align1
3563    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3564    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3565    ; SI: [[UV:%[0-9]+]]:_(p0), [[UV1:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY1]](<2 x p0>)
3566    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](p0)
3567    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3568    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3569    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3570    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
3571    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
3572    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
3573    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3574    ; SI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C2]]
3575    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY2]](s32)
3576    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
3577    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3578    ; SI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C2]]
3579    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY4]](s32)
3580    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
3581    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3582    ; SI: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C2]]
3583    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[COPY6]](s32)
3584    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3585    ; SI: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[C2]]
3586    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[C1]](s32)
3587    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3588    ; SI: G_STORE [[COPY9]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
3589    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
3590    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3591    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3592    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
3593    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3594    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
3595    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3596    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
3597    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
3598    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
3599    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3600    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
3601    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3602    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
3603    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3604    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
3605    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
3606    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
3607    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
3608    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
3609    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
3610    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
3611    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3612    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
3613    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
3614    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
3615    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
3616    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
3617    ; SI: [[C10:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3618    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C10]](s64)
3619    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](p0)
3620    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
3621    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
3622    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
3623    ; SI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
3624    ; SI: [[AND4:%[0-9]+]]:_(s32) = G_AND [[COPY18]], [[C2]]
3625    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[AND4]], [[COPY17]](s32)
3626    ; SI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
3627    ; SI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
3628    ; SI: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY20]], [[C2]]
3629    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[AND5]], [[COPY19]](s32)
3630    ; SI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
3631    ; SI: [[COPY22:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3632    ; SI: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY22]], [[C2]]
3633    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[AND6]], [[COPY21]](s32)
3634    ; SI: [[COPY23:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
3635    ; SI: [[COPY24:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
3636    ; SI: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY24]], [[C2]]
3637    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[AND7]], [[COPY23]](s32)
3638    ; SI: [[COPY25:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
3639    ; SI: G_STORE [[COPY25]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
3640    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
3641    ; SI: [[COPY26:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
3642    ; SI: G_STORE [[COPY26]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
3643    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
3644    ; SI: [[COPY27:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
3645    ; SI: G_STORE [[COPY27]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
3646    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
3647    ; SI: [[COPY28:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
3648    ; SI: G_STORE [[COPY28]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
3649    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C6]](s64)
3650    ; SI: [[COPY29:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3651    ; SI: G_STORE [[COPY29]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
3652    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C7]](s64)
3653    ; SI: [[COPY30:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
3654    ; SI: G_STORE [[COPY30]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
3655    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C8]](s64)
3656    ; SI: [[COPY31:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
3657    ; SI: G_STORE [[COPY31]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
3658    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C9]](s64)
3659    ; SI: [[COPY32:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
3660    ; SI: G_STORE [[COPY32]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
3661    ; CI-LABEL: name: test_store_global_v2p0_align1
3662    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3663    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3664    ; CI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
3665    ; VI-LABEL: name: test_store_global_v2p0_align1
3666    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3667    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3668    ; VI: [[UV:%[0-9]+]]:_(p0), [[UV1:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY1]](<2 x p0>)
3669    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](p0)
3670    ; VI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[UV2]](s32)
3671    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3672    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3673    ; VI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR]](s32)
3674    ; VI: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[UV3]](s32)
3675    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3676    ; VI: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR1]](s32)
3677    ; VI: [[C1:%[0-9]+]]:_(s16) = G_CONSTANT i16 8
3678    ; VI: [[LSHR2:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[C1]](s16)
3679    ; VI: [[LSHR3:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC1]], [[C1]](s16)
3680    ; VI: [[LSHR4:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC2]], [[C1]](s16)
3681    ; VI: [[LSHR5:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC3]], [[C1]](s16)
3682    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3683    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
3684    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
3685    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
3686    ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR2]](s16)
3687    ; VI: G_STORE [[ANYEXT]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
3688    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3689    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3690    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3691    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
3692    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
3693    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
3694    ; VI: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR3]](s16)
3695    ; VI: G_STORE [[ANYEXT1]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
3696    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3697    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
3698    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3699    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
3700    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
3701    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
3702    ; VI: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR4]](s16)
3703    ; VI: G_STORE [[ANYEXT2]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
3704    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
3705    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
3706    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3707    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
3708    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
3709    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
3710    ; VI: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR5]](s16)
3711    ; VI: G_STORE [[ANYEXT3]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
3712    ; VI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3713    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
3714    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](p0)
3715    ; VI: [[TRUNC4:%[0-9]+]]:_(s16) = G_TRUNC [[UV4]](s32)
3716    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
3717    ; VI: [[TRUNC5:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR6]](s32)
3718    ; VI: [[TRUNC6:%[0-9]+]]:_(s16) = G_TRUNC [[UV5]](s32)
3719    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
3720    ; VI: [[TRUNC7:%[0-9]+]]:_(s16) = G_TRUNC [[LSHR7]](s32)
3721    ; VI: [[LSHR8:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC4]], [[C1]](s16)
3722    ; VI: [[LSHR9:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC5]], [[C1]](s16)
3723    ; VI: [[LSHR10:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC6]], [[C1]](s16)
3724    ; VI: [[LSHR11:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC7]], [[C1]](s16)
3725    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
3726    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
3727    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C2]](s64)
3728    ; VI: [[ANYEXT4:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR8]](s16)
3729    ; VI: G_STORE [[ANYEXT4]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
3730    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
3731    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
3732    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
3733    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
3734    ; VI: [[ANYEXT5:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR9]](s16)
3735    ; VI: G_STORE [[ANYEXT5]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
3736    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
3737    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3738    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
3739    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C6]](s64)
3740    ; VI: [[ANYEXT6:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR10]](s16)
3741    ; VI: G_STORE [[ANYEXT6]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
3742    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C7]](s64)
3743    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
3744    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
3745    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C8]](s64)
3746    ; VI: [[ANYEXT7:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR11]](s16)
3747    ; VI: G_STORE [[ANYEXT7]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
3748    ; GFX9-LABEL: name: test_store_global_v2p0_align1
3749    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3750    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3751    ; GFX9: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
3752    %0:_(p1) = COPY $vgpr0_vgpr1
3753    %1:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3754    G_STORE %1, %0 :: (store 16, align 1, addrspace 1)
3755...
3756
3757---
3758name: test_store_global_v2p0_align2
3759body: |
3760  bb.0:
3761    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3762
3763    ; SI-LABEL: name: test_store_global_v2p0_align2
3764    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3765    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3766    ; SI: [[UV:%[0-9]+]]:_(p0), [[UV1:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY1]](<2 x p0>)
3767    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](p0)
3768    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3769    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3770    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3771    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3772    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
3773    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3774    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
3775    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3776    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
3777    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3778    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
3779    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3780    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
3781    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
3782    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3783    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3784    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
3785    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3786    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
3787    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](p0)
3788    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
3789    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
3790    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
3791    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
3792    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
3793    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3794    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
3795    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
3796    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3797    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
3798    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
3799    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3800    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
3801    ; CI-LABEL: name: test_store_global_v2p0_align2
3802    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3803    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3804    ; CI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
3805    ; VI-LABEL: name: test_store_global_v2p0_align2
3806    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3807    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3808    ; VI: [[UV:%[0-9]+]]:_(p0), [[UV1:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY1]](<2 x p0>)
3809    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](p0)
3810    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3811    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
3812    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
3813    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
3814    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
3815    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3816    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
3817    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3818    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
3819    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3820    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
3821    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
3822    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
3823    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
3824    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3825    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3826    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
3827    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3828    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
3829    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](p0)
3830    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
3831    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
3832    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
3833    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
3834    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
3835    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3836    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
3837    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
3838    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
3839    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
3840    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
3841    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3842    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
3843    ; GFX9-LABEL: name: test_store_global_v2p0_align2
3844    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3845    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3846    ; GFX9: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
3847    %0:_(p1) = COPY $vgpr0_vgpr1
3848    %1:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3849    G_STORE %1, %0 :: (store 16, align 2, addrspace 1)
3850...
3851
3852---
3853name: test_store_global_v2p0_align4
3854body: |
3855  bb.0:
3856    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3857
3858    ; SI-LABEL: name: test_store_global_v2p0_align4
3859    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3860    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3861    ; SI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3862    ; CI-LABEL: name: test_store_global_v2p0_align4
3863    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3864    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3865    ; CI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3866    ; VI-LABEL: name: test_store_global_v2p0_align4
3867    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3868    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3869    ; VI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3870    ; GFX9-LABEL: name: test_store_global_v2p0_align4
3871    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3872    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3873    ; GFX9: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
3874    %0:_(p1) = COPY $vgpr0_vgpr1
3875    %1:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3876    G_STORE %1, %0 :: (store 16, align 4, addrspace 1)
3877...
3878
3879---
3880name: test_store_global_v2p0_align8
3881body: |
3882  bb.0:
3883    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3884
3885    ; SI-LABEL: name: test_store_global_v2p0_align8
3886    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3887    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3888    ; SI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3889    ; CI-LABEL: name: test_store_global_v2p0_align8
3890    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3891    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3892    ; CI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3893    ; VI-LABEL: name: test_store_global_v2p0_align8
3894    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3895    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3896    ; VI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3897    ; GFX9-LABEL: name: test_store_global_v2p0_align8
3898    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3899    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3900    ; GFX9: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
3901    %0:_(p1) = COPY $vgpr0_vgpr1
3902    %1:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3903    G_STORE %1, %0 :: (store 16, align 8, addrspace 1)
3904...
3905
3906---
3907name: test_store_global_v2p0_align16
3908body: |
3909  bb.0:
3910    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
3911
3912    ; SI-LABEL: name: test_store_global_v2p0_align16
3913    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3914    ; SI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3915    ; SI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, addrspace 1)
3916    ; CI-LABEL: name: test_store_global_v2p0_align16
3917    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3918    ; CI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3919    ; CI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, addrspace 1)
3920    ; VI-LABEL: name: test_store_global_v2p0_align16
3921    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3922    ; VI: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3923    ; VI: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, addrspace 1)
3924    ; GFX9-LABEL: name: test_store_global_v2p0_align16
3925    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3926    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3927    ; GFX9: G_STORE [[COPY1]](<2 x p0>), [[COPY]](p1) :: (store 16, addrspace 1)
3928    %0:_(p1) = COPY $vgpr0_vgpr1
3929    %1:_(<2 x p0>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
3930    G_STORE %1, %0 :: (store 16, align 16, addrspace 1)
3931...
3932
3933---
3934name: test_store_global_s96_align1
3935body: |
3936  bb.0:
3937    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
3938
3939    ; SI-LABEL: name: test_store_global_s96_align1
3940    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
3941    ; SI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
3942    ; SI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
3943    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[BITCAST]](<3 x s32>), 0
3944    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<3 x s32>), 64
3945    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<2 x s32>)
3946    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
3947    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
3948    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
3949    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
3950    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
3951    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
3952    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
3953    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
3954    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
3955    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
3956    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
3957    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
3958    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
3959    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
3960    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
3961    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
3962    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
3963    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
3964    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
3965    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
3966    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
3967    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
3968    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
3969    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
3970    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
3971    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
3972    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
3973    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
3974    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
3975    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
3976    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
3977    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
3978    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
3979    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
3980    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
3981    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
3982    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
3983    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
3984    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
3985    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
3986    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
3987    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
3988    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
3989    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
3990    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
3991    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
3992    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
3993    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
3994    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
3995    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
3996    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
3997    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
3998    ; CI-LABEL: name: test_store_global_s96_align1
3999    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4000    ; CI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4001    ; CI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4002    ; CI: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 1, addrspace 1)
4003    ; VI-LABEL: name: test_store_global_s96_align1
4004    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4005    ; VI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4006    ; VI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4007    ; VI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[BITCAST]](<3 x s32>), 0
4008    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<3 x s32>), 64
4009    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<2 x s32>)
4010    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
4011    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
4012    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4013    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
4014    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
4015    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
4016    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
4017    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
4018    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
4019    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4020    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4021    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
4022    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4023    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
4024    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4025    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
4026    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
4027    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
4028    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4029    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
4030    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4031    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
4032    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
4033    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
4034    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
4035    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
4036    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
4037    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
4038    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
4039    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
4040    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
4041    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
4042    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
4043    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
4044    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
4045    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
4046    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4047    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
4048    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
4049    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
4050    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
4051    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
4052    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
4053    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
4054    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
4055    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
4056    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
4057    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
4058    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
4059    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
4060    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
4061    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
4062    ; GFX9-LABEL: name: test_store_global_s96_align1
4063    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4064    ; GFX9: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4065    ; GFX9: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4066    ; GFX9: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 1, addrspace 1)
4067    %0:_(p1) = COPY $vgpr0_vgpr1
4068    %1:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4069    G_STORE %1, %0 :: (store 12, align 1, addrspace 1)
4070...
4071
4072---
4073name: test_store_global_s96_align2
4074body: |
4075  bb.0:
4076    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
4077
4078    ; SI-LABEL: name: test_store_global_s96_align2
4079    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4080    ; SI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4081    ; SI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4082    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[BITCAST]](<3 x s32>), 0
4083    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<3 x s32>), 64
4084    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<2 x s32>)
4085    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4086    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
4087    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
4088    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
4089    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4090    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
4091    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4092    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
4093    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4094    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
4095    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
4096    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
4097    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
4098    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
4099    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4100    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
4101    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4102    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4103    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
4104    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
4105    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
4106    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
4107    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4108    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
4109    ; CI-LABEL: name: test_store_global_s96_align2
4110    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4111    ; CI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4112    ; CI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4113    ; CI: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 2, addrspace 1)
4114    ; VI-LABEL: name: test_store_global_s96_align2
4115    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4116    ; VI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4117    ; VI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4118    ; VI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[BITCAST]](<3 x s32>), 0
4119    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<3 x s32>), 64
4120    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<2 x s32>)
4121    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4122    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
4123    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
4124    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
4125    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4126    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
4127    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4128    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
4129    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4130    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
4131    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
4132    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
4133    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
4134    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
4135    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4136    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
4137    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4138    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4139    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
4140    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
4141    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
4142    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
4143    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4144    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
4145    ; GFX9-LABEL: name: test_store_global_s96_align2
4146    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4147    ; GFX9: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4148    ; GFX9: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4149    ; GFX9: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 2, addrspace 1)
4150    %0:_(p1) = COPY $vgpr0_vgpr1
4151    %1:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4152    G_STORE %1, %0 :: (store 12, align 2, addrspace 1)
4153...
4154
4155---
4156name: test_store_global_s96_align4
4157body: |
4158  bb.0:
4159    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
4160
4161    ; SI-LABEL: name: test_store_global_s96_align4
4162    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4163    ; SI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4164    ; SI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4165    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[BITCAST]](<3 x s32>), 0
4166    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<3 x s32>), 64
4167    ; SI: G_STORE [[EXTRACT]](<2 x s32>), [[COPY]](p1) :: (store 8, align 4, addrspace 1)
4168    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4169    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4170    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 8, addrspace 1)
4171    ; CI-LABEL: name: test_store_global_s96_align4
4172    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4173    ; CI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4174    ; CI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4175    ; CI: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 4, addrspace 1)
4176    ; VI-LABEL: name: test_store_global_s96_align4
4177    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4178    ; VI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4179    ; VI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4180    ; VI: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 4, addrspace 1)
4181    ; GFX9-LABEL: name: test_store_global_s96_align4
4182    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4183    ; GFX9: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4184    ; GFX9: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4185    ; GFX9: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 4, addrspace 1)
4186    %0:_(p1) = COPY $vgpr0_vgpr1
4187    %1:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4188    G_STORE %1, %0 :: (store 12, align 4, addrspace 1)
4189...
4190
4191---
4192name: test_store_global_s96_align8
4193body: |
4194  bb.0:
4195    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
4196
4197    ; SI-LABEL: name: test_store_global_s96_align8
4198    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4199    ; SI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4200    ; SI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4201    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[BITCAST]](<3 x s32>), 0
4202    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<3 x s32>), 64
4203    ; SI: G_STORE [[EXTRACT]](<2 x s32>), [[COPY]](p1) :: (store 8, addrspace 1)
4204    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4205    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4206    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 8, align 8, addrspace 1)
4207    ; CI-LABEL: name: test_store_global_s96_align8
4208    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4209    ; CI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4210    ; CI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4211    ; CI: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 8, addrspace 1)
4212    ; VI-LABEL: name: test_store_global_s96_align8
4213    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4214    ; VI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4215    ; VI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4216    ; VI: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 8, addrspace 1)
4217    ; GFX9-LABEL: name: test_store_global_s96_align8
4218    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4219    ; GFX9: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4220    ; GFX9: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4221    ; GFX9: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 8, addrspace 1)
4222    %0:_(p1) = COPY $vgpr0_vgpr1
4223    %1:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4224    G_STORE %1, %0 :: (store 12, align 8, addrspace 1)
4225...
4226
4227---
4228name: test_store_global_s96_align16
4229body: |
4230  bb.0:
4231    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
4232
4233    ; SI-LABEL: name: test_store_global_s96_align16
4234    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4235    ; SI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4236    ; SI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4237    ; SI: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[BITCAST]](<3 x s32>), 0
4238    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<3 x s32>), 64
4239    ; SI: G_STORE [[EXTRACT]](<2 x s32>), [[COPY]](p1) :: (store 8, align 16, addrspace 1)
4240    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4241    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4242    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 8, align 8, addrspace 1)
4243    ; CI-LABEL: name: test_store_global_s96_align16
4244    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4245    ; CI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4246    ; CI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4247    ; CI: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 16, addrspace 1)
4248    ; VI-LABEL: name: test_store_global_s96_align16
4249    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4250    ; VI: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4251    ; VI: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4252    ; VI: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 16, addrspace 1)
4253    ; GFX9-LABEL: name: test_store_global_s96_align16
4254    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4255    ; GFX9: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4256    ; GFX9: [[BITCAST:%[0-9]+]]:_(<3 x s32>) = G_BITCAST [[COPY1]](s96)
4257    ; GFX9: G_STORE [[BITCAST]](<3 x s32>), [[COPY]](p1) :: (store 12, align 16, addrspace 1)
4258    %0:_(p1) = COPY $vgpr0_vgpr1
4259    %1:_(s96) = COPY $vgpr2_vgpr3_vgpr4
4260    G_STORE %1, %0 :: (store 12, align 16, addrspace 1)
4261...
4262
4263---
4264name: test_store_global_s128_align1
4265body: |
4266  bb.0:
4267    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
4268
4269    ; SI-LABEL: name: test_store_global_s128_align1
4270    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4271    ; SI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4272    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4273    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[BITCAST]](<4 x s32>)
4274    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
4275    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
4276    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4277    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
4278    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
4279    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
4280    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
4281    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
4282    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
4283    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4284    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4285    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
4286    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4287    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
4288    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4289    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
4290    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
4291    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
4292    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4293    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
4294    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4295    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
4296    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
4297    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
4298    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
4299    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
4300    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
4301    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
4302    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
4303    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
4304    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
4305    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
4306    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
4307    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
4308    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
4309    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
4310    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4311    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
4312    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
4313    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
4314    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
4315    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
4316    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
4317    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
4318    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
4319    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
4320    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
4321    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
4322    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
4323    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
4324    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
4325    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
4326    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
4327    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
4328    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
4329    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
4330    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
4331    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
4332    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
4333    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
4334    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
4335    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
4336    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
4337    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
4338    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
4339    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
4340    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
4341    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
4342    ; CI-LABEL: name: test_store_global_s128_align1
4343    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4344    ; CI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4345    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4346    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
4347    ; VI-LABEL: name: test_store_global_s128_align1
4348    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4349    ; VI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4350    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4351    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[BITCAST]](<4 x s32>)
4352    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
4353    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
4354    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4355    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
4356    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
4357    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
4358    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
4359    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
4360    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
4361    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4362    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4363    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
4364    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4365    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
4366    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4367    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
4368    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
4369    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
4370    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4371    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
4372    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4373    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
4374    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
4375    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
4376    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
4377    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
4378    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
4379    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
4380    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
4381    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
4382    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
4383    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
4384    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
4385    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
4386    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
4387    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
4388    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4389    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
4390    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
4391    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
4392    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
4393    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
4394    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
4395    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
4396    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
4397    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
4398    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
4399    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
4400    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
4401    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
4402    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
4403    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
4404    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
4405    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
4406    ; VI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
4407    ; VI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
4408    ; VI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
4409    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
4410    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
4411    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
4412    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
4413    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
4414    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
4415    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
4416    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
4417    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
4418    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
4419    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
4420    ; GFX9-LABEL: name: test_store_global_s128_align1
4421    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4422    ; GFX9: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4423    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4424    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
4425    %0:_(p1) = COPY $vgpr0_vgpr1
4426    %1:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4427    G_STORE %1, %0 :: (store 16, align 1, addrspace 1)
4428...
4429
4430---
4431name: test_store_global_s128_align2
4432body: |
4433  bb.0:
4434    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
4435
4436    ; SI-LABEL: name: test_store_global_s128_align2
4437    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4438    ; SI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4439    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4440    ; SI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<4 x s32>)
4441    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
4442    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4443    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
4444    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
4445    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
4446    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4447    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
4448    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4449    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
4450    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4451    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
4452    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
4453    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
4454    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
4455    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
4456    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4457    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
4458    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4459    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4460    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
4461    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
4462    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
4463    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
4464    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
4465    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4466    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
4467    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
4468    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
4469    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
4470    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
4471    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
4472    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
4473    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
4474    ; CI-LABEL: name: test_store_global_s128_align2
4475    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4476    ; CI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4477    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4478    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
4479    ; VI-LABEL: name: test_store_global_s128_align2
4480    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4481    ; VI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4482    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4483    ; VI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<4 x s32>)
4484    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
4485    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4486    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
4487    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
4488    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
4489    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4490    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
4491    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4492    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
4493    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4494    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
4495    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
4496    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
4497    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
4498    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
4499    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4500    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
4501    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4502    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4503    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
4504    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
4505    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
4506    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
4507    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
4508    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4509    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
4510    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
4511    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
4512    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
4513    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
4514    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
4515    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
4516    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
4517    ; GFX9-LABEL: name: test_store_global_s128_align2
4518    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4519    ; GFX9: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4520    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4521    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
4522    %0:_(p1) = COPY $vgpr0_vgpr1
4523    %1:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4524    G_STORE %1, %0 :: (store 16, align 2, addrspace 1)
4525...
4526
4527---
4528name: test_store_global_s128_align4
4529body: |
4530  bb.0:
4531    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
4532
4533    ; SI-LABEL: name: test_store_global_s128_align4
4534    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4535    ; SI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4536    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4537    ; SI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
4538    ; CI-LABEL: name: test_store_global_s128_align4
4539    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4540    ; CI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4541    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4542    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
4543    ; VI-LABEL: name: test_store_global_s128_align4
4544    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4545    ; VI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4546    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4547    ; VI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
4548    ; GFX9-LABEL: name: test_store_global_s128_align4
4549    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4550    ; GFX9: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4551    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4552    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
4553    %0:_(p1) = COPY $vgpr0_vgpr1
4554    %1:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4555    G_STORE %1, %0 :: (store 16, align 4, addrspace 1)
4556...
4557
4558---
4559name: test_store_global_s128_align8
4560body: |
4561  bb.0:
4562    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
4563
4564    ; SI-LABEL: name: test_store_global_s128_align8
4565    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4566    ; SI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4567    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4568    ; SI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
4569    ; CI-LABEL: name: test_store_global_s128_align8
4570    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4571    ; CI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4572    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4573    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
4574    ; VI-LABEL: name: test_store_global_s128_align8
4575    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4576    ; VI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4577    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4578    ; VI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
4579    ; GFX9-LABEL: name: test_store_global_s128_align8
4580    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4581    ; GFX9: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4582    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4583    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
4584    %0:_(p1) = COPY $vgpr0_vgpr1
4585    %1:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4586    G_STORE %1, %0 :: (store 16, align 8, addrspace 1)
4587...
4588
4589---
4590name: test_store_global_s128_align16
4591body: |
4592  bb.0:
4593    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
4594
4595    ; SI-LABEL: name: test_store_global_s128_align16
4596    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4597    ; SI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4598    ; SI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4599    ; SI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
4600    ; CI-LABEL: name: test_store_global_s128_align16
4601    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4602    ; CI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4603    ; CI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4604    ; CI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
4605    ; VI-LABEL: name: test_store_global_s128_align16
4606    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4607    ; VI: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4608    ; VI: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4609    ; VI: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
4610    ; GFX9-LABEL: name: test_store_global_s128_align16
4611    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4612    ; GFX9: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4613    ; GFX9: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](s128)
4614    ; GFX9: G_STORE [[BITCAST]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
4615    %0:_(p1) = COPY $vgpr0_vgpr1
4616    %1:_(s128) = COPY $vgpr2_vgpr3_vgpr4_vgpr5
4617    G_STORE %1, %0 :: (store 16, align 16, addrspace 1)
4618...
4619
4620---
4621name: test_store_global_v5s32_align1
4622body: |
4623  bb.0:
4624    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4625
4626    ; SI-LABEL: name: test_store_global_v5s32_align1
4627    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4628    ; SI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4629    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4630    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4631    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
4632    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
4633    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
4634    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4635    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
4636    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
4637    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
4638    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
4639    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
4640    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
4641    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4642    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4643    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
4644    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4645    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
4646    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4647    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
4648    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
4649    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
4650    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4651    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
4652    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4653    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
4654    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
4655    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
4656    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
4657    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
4658    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
4659    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
4660    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
4661    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
4662    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
4663    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
4664    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
4665    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
4666    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
4667    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
4668    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4669    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
4670    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
4671    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
4672    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
4673    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
4674    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
4675    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
4676    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
4677    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
4678    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
4679    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
4680    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
4681    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
4682    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
4683    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
4684    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
4685    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
4686    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
4687    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
4688    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
4689    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
4690    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
4691    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
4692    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
4693    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
4694    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
4695    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
4696    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
4697    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
4698    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
4699    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
4700    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4701    ; SI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
4702    ; SI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
4703    ; SI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
4704    ; SI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
4705    ; SI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
4706    ; SI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
4707    ; SI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
4708    ; SI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
4709    ; SI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
4710    ; SI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
4711    ; SI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
4712    ; SI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
4713    ; SI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
4714    ; SI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
4715    ; SI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
4716    ; CI-LABEL: name: test_store_global_v5s32_align1
4717    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4718    ; CI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4719    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4720    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4721    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
4722    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4723    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4724    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 1, addrspace 1)
4725    ; VI-LABEL: name: test_store_global_v5s32_align1
4726    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4727    ; VI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4728    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4729    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4730    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
4731    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
4732    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
4733    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4734    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
4735    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
4736    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
4737    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
4738    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
4739    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
4740    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4741    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4742    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
4743    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4744    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
4745    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4746    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
4747    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
4748    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
4749    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4750    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
4751    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4752    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
4753    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
4754    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
4755    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
4756    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
4757    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
4758    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
4759    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
4760    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
4761    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
4762    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
4763    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
4764    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
4765    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
4766    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
4767    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4768    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
4769    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
4770    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
4771    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
4772    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
4773    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
4774    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
4775    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
4776    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
4777    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
4778    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
4779    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
4780    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
4781    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
4782    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
4783    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
4784    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
4785    ; VI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
4786    ; VI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
4787    ; VI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
4788    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
4789    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
4790    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
4791    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
4792    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
4793    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
4794    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
4795    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
4796    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
4797    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
4798    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
4799    ; VI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4800    ; VI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
4801    ; VI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
4802    ; VI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
4803    ; VI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
4804    ; VI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
4805    ; VI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
4806    ; VI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
4807    ; VI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
4808    ; VI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
4809    ; VI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
4810    ; VI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
4811    ; VI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
4812    ; VI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
4813    ; VI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
4814    ; VI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
4815    ; GFX9-LABEL: name: test_store_global_v5s32_align1
4816    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4817    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4818    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4819    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4820    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
4821    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4822    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4823    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 1, addrspace 1)
4824    %0:_(p1) = COPY $vgpr0_vgpr1
4825    %1:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4826    G_STORE %1, %0 :: (store 20, align 1, addrspace 1)
4827...
4828
4829---
4830name: test_store_global_v5s32_align2
4831body: |
4832  bb.0:
4833    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4834
4835    ; SI-LABEL: name: test_store_global_v5s32_align2
4836    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4837    ; SI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4838    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4839    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4840    ; SI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
4841    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
4842    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4843    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
4844    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
4845    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
4846    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4847    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
4848    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4849    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
4850    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4851    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
4852    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
4853    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
4854    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
4855    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
4856    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4857    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
4858    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4859    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4860    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
4861    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
4862    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
4863    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
4864    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
4865    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4866    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
4867    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
4868    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
4869    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
4870    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
4871    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
4872    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
4873    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
4874    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4875    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
4876    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
4877    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
4878    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
4879    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
4880    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
4881    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
4882    ; CI-LABEL: name: test_store_global_v5s32_align2
4883    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4884    ; CI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4885    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4886    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4887    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
4888    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4889    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4890    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 2, addrspace 1)
4891    ; VI-LABEL: name: test_store_global_v5s32_align2
4892    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4893    ; VI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4894    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4895    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4896    ; VI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
4897    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
4898    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
4899    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
4900    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
4901    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
4902    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
4903    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
4904    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
4905    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
4906    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
4907    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
4908    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
4909    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
4910    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
4911    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
4912    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
4913    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
4914    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
4915    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
4916    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
4917    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
4918    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
4919    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
4920    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
4921    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
4922    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
4923    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
4924    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
4925    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
4926    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
4927    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
4928    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
4929    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
4930    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4931    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
4932    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
4933    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
4934    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
4935    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
4936    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
4937    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
4938    ; GFX9-LABEL: name: test_store_global_v5s32_align2
4939    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4940    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4941    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4942    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4943    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
4944    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4945    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4946    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 2, addrspace 1)
4947    %0:_(p1) = COPY $vgpr0_vgpr1
4948    %1:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4949    G_STORE %1, %0 :: (store 20, align 2, addrspace 1)
4950...
4951
4952---
4953name: test_store_global_v5s32_align4
4954body: |
4955  bb.0:
4956    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4957
4958    ; SI-LABEL: name: test_store_global_v5s32_align4
4959    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4960    ; SI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4961    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4962    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4963    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
4964    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4965    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4966    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
4967    ; CI-LABEL: name: test_store_global_v5s32_align4
4968    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4969    ; CI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4970    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4971    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4972    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
4973    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4974    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4975    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
4976    ; VI-LABEL: name: test_store_global_v5s32_align4
4977    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4978    ; VI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4979    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4980    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4981    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
4982    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4983    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4984    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
4985    ; GFX9-LABEL: name: test_store_global_v5s32_align4
4986    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
4987    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4988    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
4989    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
4990    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
4991    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
4992    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
4993    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
4994    %0:_(p1) = COPY $vgpr0_vgpr1
4995    %1:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
4996    G_STORE %1, %0 :: (store 20, align 4, addrspace 1)
4997...
4998
4999---
5000name: test_store_global_v5s32_align8
5001body: |
5002  bb.0:
5003    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5004
5005    ; SI-LABEL: name: test_store_global_v5s32_align8
5006    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5007    ; SI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5008    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
5009    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
5010    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
5011    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5012    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5013    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
5014    ; CI-LABEL: name: test_store_global_v5s32_align8
5015    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5016    ; CI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5017    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
5018    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
5019    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
5020    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5021    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5022    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
5023    ; VI-LABEL: name: test_store_global_v5s32_align8
5024    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5025    ; VI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5026    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
5027    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
5028    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
5029    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5030    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5031    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
5032    ; GFX9-LABEL: name: test_store_global_v5s32_align8
5033    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5034    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5035    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
5036    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
5037    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
5038    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5039    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5040    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
5041    %0:_(p1) = COPY $vgpr0_vgpr1
5042    %1:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5043    G_STORE %1, %0 :: (store 20, align 8, addrspace 1)
5044...
5045
5046---
5047name: test_store_global_v5s32_align16
5048body: |
5049  bb.0:
5050    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5051
5052    ; SI-LABEL: name: test_store_global_v5s32_align16
5053    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5054    ; SI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5055    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
5056    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
5057    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
5058    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5059    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5060    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5061    ; CI-LABEL: name: test_store_global_v5s32_align16
5062    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5063    ; CI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5064    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
5065    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
5066    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
5067    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5068    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5069    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5070    ; VI-LABEL: name: test_store_global_v5s32_align16
5071    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5072    ; VI: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5073    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
5074    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
5075    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
5076    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5077    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5078    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5079    ; GFX9-LABEL: name: test_store_global_v5s32_align16
5080    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5081    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5082    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[COPY1]](<5 x s32>), 0
5083    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x s32>), 128
5084    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
5085    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5086    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5087    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5088    %0:_(p1) = COPY $vgpr0_vgpr1
5089    %1:_(<5 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5090    G_STORE %1, %0 :: (store 20, align 16, addrspace 1)
5091...
5092
5093---
5094name: test_store_global_v5p3_align1
5095body: |
5096  bb.0:
5097    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5098    ; SI-LABEL: name: test_store_global_v5p3_align1
5099    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5100    ; SI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5101    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5102    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5103    ; SI: [[UV:%[0-9]+]]:_(p3), [[UV1:%[0-9]+]]:_(p3), [[UV2:%[0-9]+]]:_(p3), [[UV3:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[EXTRACT]](<4 x p3>)
5104    ; SI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV]](p3)
5105    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
5106    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
5107    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
5108    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C1]](s32)
5109    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
5110    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C2]](s32)
5111    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
5112    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
5113    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
5114    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
5115    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
5116    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
5117    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
5118    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
5119    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
5120    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
5121    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
5122    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
5123    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
5124    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
5125    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
5126    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
5127    ; SI: [[PTRTOINT1:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV1]](p3)
5128    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C]](s32)
5129    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C1]](s32)
5130    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C2]](s32)
5131    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[PTRTOINT1]](s32)
5132    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
5133    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
5134    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
5135    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
5136    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
5137    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
5138    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
5139    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
5140    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
5141    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
5142    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
5143    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
5144    ; SI: [[PTRTOINT2:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV2]](p3)
5145    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT2]], [[C]](s32)
5146    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT2]], [[C1]](s32)
5147    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT2]], [[C2]](s32)
5148    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[PTRTOINT2]](s32)
5149    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
5150    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
5151    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
5152    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
5153    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
5154    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
5155    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
5156    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
5157    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
5158    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
5159    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
5160    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
5161    ; SI: [[PTRTOINT3:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV3]](p3)
5162    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT3]], [[C]](s32)
5163    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT3]], [[C1]](s32)
5164    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT3]], [[C2]](s32)
5165    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[PTRTOINT3]](s32)
5166    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
5167    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
5168    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
5169    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
5170    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
5171    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
5172    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
5173    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
5174    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
5175    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
5176    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5177    ; SI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
5178    ; SI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
5179    ; SI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
5180    ; SI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
5181    ; SI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
5182    ; SI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
5183    ; SI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
5184    ; SI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
5185    ; SI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
5186    ; SI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
5187    ; SI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
5188    ; SI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
5189    ; SI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
5190    ; SI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
5191    ; SI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
5192    ; CI-LABEL: name: test_store_global_v5p3_align1
5193    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5194    ; CI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5195    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5196    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5197    ; CI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
5198    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5199    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5200    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 1, addrspace 1)
5201    ; VI-LABEL: name: test_store_global_v5p3_align1
5202    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5203    ; VI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5204    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5205    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5206    ; VI: [[UV:%[0-9]+]]:_(p3), [[UV1:%[0-9]+]]:_(p3), [[UV2:%[0-9]+]]:_(p3), [[UV3:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[EXTRACT]](<4 x p3>)
5207    ; VI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV]](p3)
5208    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
5209    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
5210    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
5211    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C1]](s32)
5212    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
5213    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C2]](s32)
5214    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
5215    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
5216    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
5217    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
5218    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
5219    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
5220    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
5221    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
5222    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
5223    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
5224    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
5225    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
5226    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
5227    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
5228    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
5229    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
5230    ; VI: [[PTRTOINT1:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV1]](p3)
5231    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C]](s32)
5232    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C1]](s32)
5233    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C2]](s32)
5234    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[PTRTOINT1]](s32)
5235    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
5236    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
5237    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
5238    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
5239    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
5240    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
5241    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
5242    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
5243    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
5244    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
5245    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
5246    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
5247    ; VI: [[PTRTOINT2:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV2]](p3)
5248    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT2]], [[C]](s32)
5249    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT2]], [[C1]](s32)
5250    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT2]], [[C2]](s32)
5251    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[PTRTOINT2]](s32)
5252    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
5253    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
5254    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
5255    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
5256    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
5257    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
5258    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
5259    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
5260    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
5261    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
5262    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
5263    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
5264    ; VI: [[PTRTOINT3:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV3]](p3)
5265    ; VI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT3]], [[C]](s32)
5266    ; VI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT3]], [[C1]](s32)
5267    ; VI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT3]], [[C2]](s32)
5268    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[PTRTOINT3]](s32)
5269    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
5270    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
5271    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
5272    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
5273    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
5274    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
5275    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
5276    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
5277    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
5278    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
5279    ; VI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5280    ; VI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
5281    ; VI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
5282    ; VI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
5283    ; VI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
5284    ; VI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
5285    ; VI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
5286    ; VI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
5287    ; VI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
5288    ; VI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
5289    ; VI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
5290    ; VI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
5291    ; VI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
5292    ; VI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
5293    ; VI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
5294    ; VI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
5295    ; GFX9-LABEL: name: test_store_global_v5p3_align1
5296    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5297    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5298    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5299    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5300    ; GFX9: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
5301    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5302    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5303    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 1, addrspace 1)
5304    %0:_(p1) = COPY $vgpr0_vgpr1
5305    %1:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5306    G_STORE %1, %0 :: (store 20, align 1, addrspace 1)
5307...
5308
5309---
5310name: test_store_global_v5p3_align2
5311body: |
5312  bb.0:
5313    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5314
5315    ; SI-LABEL: name: test_store_global_v5p3_align2
5316    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5317    ; SI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5318    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5319    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5320    ; SI: [[UV:%[0-9]+]]:_(<2 x p3>), [[UV1:%[0-9]+]]:_(<2 x p3>) = G_UNMERGE_VALUES [[EXTRACT]](<4 x p3>)
5321    ; SI: [[UV2:%[0-9]+]]:_(p3), [[UV3:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[UV]](<2 x p3>)
5322    ; SI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV2]](p3)
5323    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
5324    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
5325    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
5326    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
5327    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
5328    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
5329    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
5330    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
5331    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
5332    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
5333    ; SI: [[PTRTOINT1:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV3]](p3)
5334    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C]](s32)
5335    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[PTRTOINT1]](s32)
5336    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
5337    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
5338    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
5339    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
5340    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
5341    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
5342    ; SI: [[UV4:%[0-9]+]]:_(p3), [[UV5:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[UV1]](<2 x p3>)
5343    ; SI: [[PTRTOINT2:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV4]](p3)
5344    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT2]], [[C]](s32)
5345    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[PTRTOINT2]](s32)
5346    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
5347    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
5348    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
5349    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
5350    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
5351    ; SI: [[PTRTOINT3:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV5]](p3)
5352    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT3]], [[C]](s32)
5353    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[PTRTOINT3]](s32)
5354    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
5355    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
5356    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
5357    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
5358    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5359    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
5360    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
5361    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
5362    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
5363    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
5364    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
5365    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
5366    ; CI-LABEL: name: test_store_global_v5p3_align2
5367    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5368    ; CI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5369    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5370    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5371    ; CI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
5372    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5373    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5374    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 2, addrspace 1)
5375    ; VI-LABEL: name: test_store_global_v5p3_align2
5376    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5377    ; VI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5378    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5379    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5380    ; VI: [[UV:%[0-9]+]]:_(<2 x p3>), [[UV1:%[0-9]+]]:_(<2 x p3>) = G_UNMERGE_VALUES [[EXTRACT]](<4 x p3>)
5381    ; VI: [[UV2:%[0-9]+]]:_(p3), [[UV3:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[UV]](<2 x p3>)
5382    ; VI: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV2]](p3)
5383    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
5384    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
5385    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
5386    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
5387    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
5388    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
5389    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
5390    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
5391    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
5392    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
5393    ; VI: [[PTRTOINT1:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV3]](p3)
5394    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT1]], [[C]](s32)
5395    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[PTRTOINT1]](s32)
5396    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
5397    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
5398    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
5399    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
5400    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
5401    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
5402    ; VI: [[UV4:%[0-9]+]]:_(p3), [[UV5:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[UV1]](<2 x p3>)
5403    ; VI: [[PTRTOINT2:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV4]](p3)
5404    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT2]], [[C]](s32)
5405    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[PTRTOINT2]](s32)
5406    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
5407    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
5408    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
5409    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
5410    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
5411    ; VI: [[PTRTOINT3:%[0-9]+]]:_(s32) = G_PTRTOINT [[UV5]](p3)
5412    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT3]], [[C]](s32)
5413    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[PTRTOINT3]](s32)
5414    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
5415    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
5416    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
5417    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
5418    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5419    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
5420    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
5421    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
5422    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
5423    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
5424    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
5425    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
5426    ; GFX9-LABEL: name: test_store_global_v5p3_align2
5427    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5428    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5429    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5430    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5431    ; GFX9: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
5432    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5433    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5434    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 2, addrspace 1)
5435    %0:_(p1) = COPY $vgpr0_vgpr1
5436    %1:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5437    G_STORE %1, %0 :: (store 20, align 2, addrspace 1)
5438...
5439
5440---
5441name: test_store_global_v5p3_align4
5442body: |
5443  bb.0:
5444    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5445
5446    ; SI-LABEL: name: test_store_global_v5p3_align4
5447    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5448    ; SI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5449    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5450    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5451    ; SI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
5452    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5453    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5454    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
5455    ; CI-LABEL: name: test_store_global_v5p3_align4
5456    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5457    ; CI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5458    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5459    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5460    ; CI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
5461    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5462    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5463    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
5464    ; VI-LABEL: name: test_store_global_v5p3_align4
5465    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5466    ; VI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5467    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5468    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5469    ; VI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
5470    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5471    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5472    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
5473    ; GFX9-LABEL: name: test_store_global_v5p3_align4
5474    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5475    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5476    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5477    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5478    ; GFX9: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
5479    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5480    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5481    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
5482    %0:_(p1) = COPY $vgpr0_vgpr1
5483    %1:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5484    G_STORE %1, %0 :: (store 20, align 4, addrspace 1)
5485...
5486
5487---
5488name: test_store_global_v5p3_align8
5489body: |
5490  bb.0:
5491    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5492
5493    ; SI-LABEL: name: test_store_global_v5p3_align8
5494    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5495    ; SI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5496    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5497    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5498    ; SI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
5499    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5500    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5501    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
5502    ; CI-LABEL: name: test_store_global_v5p3_align8
5503    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5504    ; CI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5505    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5506    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5507    ; CI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
5508    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5509    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5510    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
5511    ; VI-LABEL: name: test_store_global_v5p3_align8
5512    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5513    ; VI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5514    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5515    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5516    ; VI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
5517    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5518    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5519    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
5520    ; GFX9-LABEL: name: test_store_global_v5p3_align8
5521    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5522    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5523    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5524    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5525    ; GFX9: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
5526    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5527    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5528    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
5529    %0:_(p1) = COPY $vgpr0_vgpr1
5530    %1:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5531    G_STORE %1, %0 :: (store 20, align 8, addrspace 1)
5532...
5533
5534---
5535name: test_store_global_v5p3_align16
5536body: |
5537  bb.0:
5538    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5539
5540    ; SI-LABEL: name: test_store_global_v5p3_align16
5541    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5542    ; SI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5543    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5544    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5545    ; SI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, addrspace 1)
5546    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5547    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5548    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5549    ; CI-LABEL: name: test_store_global_v5p3_align16
5550    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5551    ; CI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5552    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5553    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5554    ; CI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, addrspace 1)
5555    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5556    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5557    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5558    ; VI-LABEL: name: test_store_global_v5p3_align16
5559    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5560    ; VI: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5561    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5562    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5563    ; VI: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, addrspace 1)
5564    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5565    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5566    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5567    ; GFX9-LABEL: name: test_store_global_v5p3_align16
5568    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5569    ; GFX9: [[COPY1:%[0-9]+]]:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5570    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x p3>) = G_EXTRACT [[COPY1]](<5 x p3>), 0
5571    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](<5 x p3>), 128
5572    ; GFX9: G_STORE [[EXTRACT]](<4 x p3>), [[COPY]](p1) :: (store 16, addrspace 1)
5573    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5574    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5575    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5576    %0:_(p1) = COPY $vgpr0_vgpr1
5577    %1:_(<5 x p3>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5578    G_STORE %1, %0 :: (store 20, align 16, addrspace 1)
5579...
5580
5581---
5582name: test_store_global_v10s16_align4
5583body: |
5584  bb.0:
5585    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5586
5587    ; SI-LABEL: name: test_store_global_v10s16_align4
5588    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5589    ; SI: [[DEF:%[0-9]+]]:_(<10 x s16>) = G_IMPLICIT_DEF
5590    ; SI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[DEF]](<10 x s16>)
5591    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5592    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5593    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
5594    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5595    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5596    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5597    ; CI-LABEL: name: test_store_global_v10s16_align4
5598    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5599    ; CI: [[DEF:%[0-9]+]]:_(<10 x s16>) = G_IMPLICIT_DEF
5600    ; CI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[DEF]](<10 x s16>)
5601    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5602    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5603    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
5604    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5605    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5606    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5607    ; VI-LABEL: name: test_store_global_v10s16_align4
5608    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5609    ; VI: [[DEF:%[0-9]+]]:_(<10 x s16>) = G_IMPLICIT_DEF
5610    ; VI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[DEF]](<10 x s16>)
5611    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5612    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5613    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
5614    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5615    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5616    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5617    ; GFX9-LABEL: name: test_store_global_v10s16_align4
5618    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5619    ; GFX9: [[DEF:%[0-9]+]]:_(<10 x s16>) = G_IMPLICIT_DEF
5620    ; GFX9: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[DEF]](<10 x s16>)
5621    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5622    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5623    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
5624    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5625    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5626    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
5627    %0:_(p1) = COPY $vgpr0_vgpr1
5628    %1:_(<10 x s16>) = G_IMPLICIT_DEF
5629    G_STORE %1, %0 :: (store 20, align 16, addrspace 1)
5630...
5631
5632---
5633name: test_store_global_v11s16_align4
5634body: |
5635  bb.0:
5636    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5637
5638    ; SI-LABEL: name: test_store_global_v11s16_align4
5639    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5640    ; SI: [[DEF:%[0-9]+]]:_(<11 x s16>) = G_IMPLICIT_DEF
5641    ; SI: G_STORE [[DEF]](<11 x s16>), [[COPY]](p1) :: (store 20, align 16, addrspace 1)
5642    ; CI-LABEL: name: test_store_global_v11s16_align4
5643    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5644    ; CI: [[DEF:%[0-9]+]]:_(<11 x s16>) = G_IMPLICIT_DEF
5645    ; CI: G_STORE [[DEF]](<11 x s16>), [[COPY]](p1) :: (store 20, align 16, addrspace 1)
5646    ; VI-LABEL: name: test_store_global_v11s16_align4
5647    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5648    ; VI: [[DEF:%[0-9]+]]:_(<11 x s16>) = G_IMPLICIT_DEF
5649    ; VI: G_STORE [[DEF]](<11 x s16>), [[COPY]](p1) :: (store 20, align 16, addrspace 1)
5650    ; GFX9-LABEL: name: test_store_global_v11s16_align4
5651    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5652    ; GFX9: [[DEF:%[0-9]+]]:_(<11 x s16>) = G_IMPLICIT_DEF
5653    ; GFX9: G_STORE [[DEF]](<11 x s16>), [[COPY]](p1) :: (store 20, align 16, addrspace 1)
5654    %0:_(p1) = COPY $vgpr0_vgpr1
5655    %1:_(<11 x s16>) = G_IMPLICIT_DEF
5656    G_STORE %1, %0 :: (store 20, align 16, addrspace 1)
5657...
5658
5659---
5660name: test_store_global_v12s16_align4
5661body: |
5662  bb.0:
5663    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5664
5665    ; SI-LABEL: name: test_store_global_v12s16_align4
5666    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5667    ; SI: [[DEF:%[0-9]+]]:_(<12 x s16>) = G_IMPLICIT_DEF
5668    ; SI: G_STORE [[DEF]](<12 x s16>), [[COPY]](p1) :: (store 20, align 16, addrspace 1)
5669    ; CI-LABEL: name: test_store_global_v12s16_align4
5670    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5671    ; CI: [[DEF:%[0-9]+]]:_(<12 x s16>) = G_IMPLICIT_DEF
5672    ; CI: G_STORE [[DEF]](<12 x s16>), [[COPY]](p1) :: (store 20, align 16, addrspace 1)
5673    ; VI-LABEL: name: test_store_global_v12s16_align4
5674    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5675    ; VI: [[DEF:%[0-9]+]]:_(<12 x s16>) = G_IMPLICIT_DEF
5676    ; VI: G_STORE [[DEF]](<12 x s16>), [[COPY]](p1) :: (store 20, align 16, addrspace 1)
5677    ; GFX9-LABEL: name: test_store_global_v12s16_align4
5678    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5679    ; GFX9: [[DEF:%[0-9]+]]:_(<12 x s16>) = G_IMPLICIT_DEF
5680    ; GFX9: G_STORE [[DEF]](<12 x s16>), [[COPY]](p1) :: (store 20, align 16, addrspace 1)
5681    %0:_(p1) = COPY $vgpr0_vgpr1
5682    %1:_(<12 x s16>) = G_IMPLICIT_DEF
5683    G_STORE %1, %0 :: (store 20, align 16, addrspace 1)
5684...
5685
5686---
5687name: test_store_global_s160_align1
5688body: |
5689  bb.0:
5690    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5691
5692    ; SI-LABEL: name: test_store_global_s160_align1
5693    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5694    ; SI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5695    ; SI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
5696    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5697    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5698    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
5699    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
5700    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
5701    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
5702    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
5703    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
5704    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
5705    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
5706    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
5707    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
5708    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
5709    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
5710    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
5711    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
5712    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
5713    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
5714    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
5715    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
5716    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
5717    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
5718    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
5719    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
5720    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
5721    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
5722    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
5723    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
5724    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
5725    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
5726    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
5727    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
5728    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
5729    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
5730    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
5731    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
5732    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
5733    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
5734    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
5735    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
5736    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
5737    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
5738    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
5739    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
5740    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
5741    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
5742    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
5743    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
5744    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
5745    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
5746    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
5747    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
5748    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
5749    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
5750    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
5751    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
5752    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
5753    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
5754    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
5755    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
5756    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
5757    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
5758    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
5759    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
5760    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
5761    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
5762    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
5763    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
5764    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
5765    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
5766    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
5767    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5768    ; SI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
5769    ; SI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
5770    ; SI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
5771    ; SI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
5772    ; SI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
5773    ; SI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
5774    ; SI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
5775    ; SI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
5776    ; SI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
5777    ; SI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
5778    ; SI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
5779    ; SI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
5780    ; SI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
5781    ; SI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
5782    ; SI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
5783    ; CI-LABEL: name: test_store_global_s160_align1
5784    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5785    ; CI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5786    ; CI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
5787    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5788    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5789    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
5790    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5791    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5792    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 1, addrspace 1)
5793    ; VI-LABEL: name: test_store_global_s160_align1
5794    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5795    ; VI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5796    ; VI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
5797    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5798    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5799    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
5800    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
5801    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
5802    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
5803    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
5804    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
5805    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
5806    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
5807    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
5808    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
5809    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
5810    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
5811    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
5812    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
5813    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
5814    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
5815    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
5816    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
5817    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
5818    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
5819    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
5820    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
5821    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
5822    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
5823    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
5824    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
5825    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
5826    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
5827    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
5828    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
5829    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
5830    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
5831    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
5832    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
5833    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
5834    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
5835    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
5836    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
5837    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
5838    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
5839    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
5840    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
5841    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
5842    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
5843    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
5844    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
5845    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
5846    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
5847    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
5848    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
5849    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
5850    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
5851    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
5852    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
5853    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
5854    ; VI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
5855    ; VI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
5856    ; VI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
5857    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
5858    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
5859    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
5860    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
5861    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
5862    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
5863    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
5864    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
5865    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
5866    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
5867    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
5868    ; VI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5869    ; VI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
5870    ; VI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
5871    ; VI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C1]](s32)
5872    ; VI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C2]](s32)
5873    ; VI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
5874    ; VI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
5875    ; VI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
5876    ; VI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
5877    ; VI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
5878    ; VI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
5879    ; VI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
5880    ; VI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
5881    ; VI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
5882    ; VI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
5883    ; VI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
5884    ; GFX9-LABEL: name: test_store_global_s160_align1
5885    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5886    ; GFX9: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5887    ; GFX9: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
5888    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5889    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5890    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
5891    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5892    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5893    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 1, addrspace 1)
5894    %0:_(p1) = COPY $vgpr0_vgpr1
5895    %1:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5896    G_STORE %1, %0 :: (store 20, align 1, addrspace 1)
5897...
5898
5899---
5900name: test_store_global_s160_align2
5901body: |
5902  bb.0:
5903    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5904
5905    ; SI-LABEL: name: test_store_global_s160_align2
5906    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5907    ; SI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5908    ; SI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
5909    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5910    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5911    ; SI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
5912    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
5913    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
5914    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
5915    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
5916    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
5917    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
5918    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
5919    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
5920    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
5921    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
5922    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
5923    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
5924    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
5925    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
5926    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
5927    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
5928    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
5929    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
5930    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
5931    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
5932    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
5933    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
5934    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
5935    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
5936    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
5937    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
5938    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
5939    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
5940    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
5941    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
5942    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
5943    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
5944    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
5945    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5946    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
5947    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
5948    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
5949    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
5950    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
5951    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
5952    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
5953    ; CI-LABEL: name: test_store_global_s160_align2
5954    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5955    ; CI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5956    ; CI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
5957    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5958    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5959    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
5960    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
5961    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
5962    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 2, addrspace 1)
5963    ; VI-LABEL: name: test_store_global_s160_align2
5964    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
5965    ; VI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
5966    ; VI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
5967    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
5968    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
5969    ; VI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
5970    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
5971    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
5972    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
5973    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
5974    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
5975    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
5976    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
5977    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
5978    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
5979    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
5980    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
5981    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
5982    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
5983    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
5984    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
5985    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
5986    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
5987    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
5988    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
5989    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
5990    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
5991    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
5992    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
5993    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
5994    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
5995    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
5996    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
5997    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
5998    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
5999    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
6000    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
6001    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
6002    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
6003    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6004    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
6005    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT1]], [[C]](s32)
6006    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[EXTRACT1]](s32)
6007    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
6008    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
6009    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
6010    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
6011    ; GFX9-LABEL: name: test_store_global_s160_align2
6012    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6013    ; GFX9: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6014    ; GFX9: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6015    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6016    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6017    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
6018    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6019    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6020    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 2, addrspace 1)
6021    %0:_(p1) = COPY $vgpr0_vgpr1
6022    %1:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6023    G_STORE %1, %0 :: (store 20, align 2, addrspace 1)
6024...
6025
6026---
6027name: test_store_global_s160_align4
6028body: |
6029  bb.0:
6030    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6031
6032    ; SI-LABEL: name: test_store_global_s160_align4
6033    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6034    ; SI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6035    ; SI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6036    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6037    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6038    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
6039    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6040    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6041    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
6042    ; CI-LABEL: name: test_store_global_s160_align4
6043    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6044    ; CI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6045    ; CI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6046    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6047    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6048    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
6049    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6050    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6051    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
6052    ; VI-LABEL: name: test_store_global_s160_align4
6053    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6054    ; VI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6055    ; VI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6056    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6057    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6058    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
6059    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6060    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6061    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
6062    ; GFX9-LABEL: name: test_store_global_s160_align4
6063    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6064    ; GFX9: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6065    ; GFX9: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6066    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6067    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6068    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
6069    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6070    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6071    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, addrspace 1)
6072    %0:_(p1) = COPY $vgpr0_vgpr1
6073    %1:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6074    G_STORE %1, %0 :: (store 20, align 4, addrspace 1)
6075...
6076
6077---
6078name: test_store_global_s160_align8
6079body: |
6080  bb.0:
6081    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6082
6083    ; SI-LABEL: name: test_store_global_s160_align8
6084    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6085    ; SI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6086    ; SI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6087    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6088    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6089    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
6090    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6091    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6092    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
6093    ; CI-LABEL: name: test_store_global_s160_align8
6094    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6095    ; CI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6096    ; CI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6097    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6098    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6099    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
6100    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6101    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6102    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
6103    ; VI-LABEL: name: test_store_global_s160_align8
6104    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6105    ; VI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6106    ; VI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6107    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6108    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6109    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
6110    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6111    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6112    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
6113    ; GFX9-LABEL: name: test_store_global_s160_align8
6114    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6115    ; GFX9: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6116    ; GFX9: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6117    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6118    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6119    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
6120    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6121    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6122    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 8, addrspace 1)
6123    %0:_(p1) = COPY $vgpr0_vgpr1
6124    %1:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6125    G_STORE %1, %0 :: (store 20, align 8, addrspace 1)
6126...
6127
6128---
6129name: test_store_global_s160_align16
6130body: |
6131  bb.0:
6132    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6133
6134    ; SI-LABEL: name: test_store_global_s160_align16
6135    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6136    ; SI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6137    ; SI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6138    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6139    ; SI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6140    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
6141    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6142    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6143    ; SI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
6144    ; CI-LABEL: name: test_store_global_s160_align16
6145    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6146    ; CI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6147    ; CI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6148    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6149    ; CI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6150    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
6151    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6152    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6153    ; CI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
6154    ; VI-LABEL: name: test_store_global_s160_align16
6155    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6156    ; VI: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6157    ; VI: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6158    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6159    ; VI: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6160    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
6161    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6162    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6163    ; VI: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
6164    ; GFX9-LABEL: name: test_store_global_s160_align16
6165    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6166    ; GFX9: [[COPY1:%[0-9]+]]:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6167    ; GFX9: [[BITCAST:%[0-9]+]]:_(<5 x s32>) = G_BITCAST [[COPY1]](s160)
6168    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[BITCAST]](<5 x s32>), 0
6169    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[BITCAST]](<5 x s32>), 128
6170    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
6171    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6172    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6173    ; GFX9: G_STORE [[EXTRACT1]](s32), [[PTR_ADD]](p1) :: (store 4 + 16, align 16, addrspace 1)
6174    %0:_(p1) = COPY $vgpr0_vgpr1
6175    %1:_(s160) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6
6176    G_STORE %1, %0 :: (store 20, align 16, addrspace 1)
6177...
6178
6179---
6180name: test_store_global_v8s32_align1
6181body: |
6182  bb.0:
6183    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6184
6185    ; SI-LABEL: name: test_store_global_v8s32_align1
6186    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6187    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6188    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6189    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<4 x s32>)
6190    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
6191    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
6192    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
6193    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
6194    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
6195    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
6196    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
6197    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
6198    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
6199    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
6200    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
6201    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
6202    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
6203    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
6204    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
6205    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
6206    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
6207    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
6208    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
6209    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
6210    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
6211    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
6212    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
6213    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
6214    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
6215    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
6216    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
6217    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
6218    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
6219    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
6220    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
6221    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
6222    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
6223    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
6224    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
6225    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
6226    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
6227    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
6228    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
6229    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C1]](s32)
6230    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C2]](s32)
6231    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
6232    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
6233    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
6234    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
6235    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
6236    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
6237    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
6238    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
6239    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
6240    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
6241    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
6242    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
6243    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
6244    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
6245    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C1]](s32)
6246    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C2]](s32)
6247    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
6248    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
6249    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
6250    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
6251    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
6252    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
6253    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
6254    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
6255    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
6256    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
6257    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
6258    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6259    ; SI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
6260    ; SI: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<4 x s32>)
6261    ; SI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
6262    ; SI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C1]](s32)
6263    ; SI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C2]](s32)
6264    ; SI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
6265    ; SI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
6266    ; SI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
6267    ; SI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
6268    ; SI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
6269    ; SI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
6270    ; SI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
6271    ; SI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
6272    ; SI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
6273    ; SI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
6274    ; SI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
6275    ; SI: [[PTR_ADD19:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C6]](s64)
6276    ; SI: [[LSHR15:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
6277    ; SI: [[LSHR16:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C1]](s32)
6278    ; SI: [[LSHR17:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C2]](s32)
6279    ; SI: [[COPY22:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
6280    ; SI: G_STORE [[COPY22]](s32), [[PTR_ADD19]](p1) :: (store 1 + 20, addrspace 1)
6281    ; SI: [[PTR_ADD20:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C3]](s64)
6282    ; SI: [[COPY23:%[0-9]+]]:_(s32) = COPY [[LSHR15]](s32)
6283    ; SI: G_STORE [[COPY23]](s32), [[PTR_ADD20]](p1) :: (store 1 + 21, addrspace 1)
6284    ; SI: [[PTR_ADD21:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C4]](s64)
6285    ; SI: [[COPY24:%[0-9]+]]:_(s32) = COPY [[LSHR16]](s32)
6286    ; SI: G_STORE [[COPY24]](s32), [[PTR_ADD21]](p1) :: (store 1 + 22, addrspace 1)
6287    ; SI: [[PTR_ADD22:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C5]](s64)
6288    ; SI: [[COPY25:%[0-9]+]]:_(s32) = COPY [[LSHR17]](s32)
6289    ; SI: G_STORE [[COPY25]](s32), [[PTR_ADD22]](p1) :: (store 1 + 23, addrspace 1)
6290    ; SI: [[PTR_ADD23:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C7]](s64)
6291    ; SI: [[LSHR18:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C]](s32)
6292    ; SI: [[LSHR19:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C1]](s32)
6293    ; SI: [[LSHR20:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C2]](s32)
6294    ; SI: [[COPY26:%[0-9]+]]:_(s32) = COPY [[UV8]](s32)
6295    ; SI: G_STORE [[COPY26]](s32), [[PTR_ADD23]](p1) :: (store 1 + 24, addrspace 1)
6296    ; SI: [[PTR_ADD24:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C3]](s64)
6297    ; SI: [[COPY27:%[0-9]+]]:_(s32) = COPY [[LSHR18]](s32)
6298    ; SI: G_STORE [[COPY27]](s32), [[PTR_ADD24]](p1) :: (store 1 + 25, addrspace 1)
6299    ; SI: [[PTR_ADD25:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C4]](s64)
6300    ; SI: [[COPY28:%[0-9]+]]:_(s32) = COPY [[LSHR19]](s32)
6301    ; SI: G_STORE [[COPY28]](s32), [[PTR_ADD25]](p1) :: (store 1 + 26, addrspace 1)
6302    ; SI: [[PTR_ADD26:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C5]](s64)
6303    ; SI: [[COPY29:%[0-9]+]]:_(s32) = COPY [[LSHR20]](s32)
6304    ; SI: G_STORE [[COPY29]](s32), [[PTR_ADD26]](p1) :: (store 1 + 27, addrspace 1)
6305    ; SI: [[PTR_ADD27:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C8]](s64)
6306    ; SI: [[LSHR21:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C]](s32)
6307    ; SI: [[LSHR22:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C1]](s32)
6308    ; SI: [[LSHR23:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C2]](s32)
6309    ; SI: [[COPY30:%[0-9]+]]:_(s32) = COPY [[UV9]](s32)
6310    ; SI: G_STORE [[COPY30]](s32), [[PTR_ADD27]](p1) :: (store 1 + 28, addrspace 1)
6311    ; SI: [[PTR_ADD28:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C3]](s64)
6312    ; SI: [[COPY31:%[0-9]+]]:_(s32) = COPY [[LSHR21]](s32)
6313    ; SI: G_STORE [[COPY31]](s32), [[PTR_ADD28]](p1) :: (store 1 + 29, addrspace 1)
6314    ; SI: [[PTR_ADD29:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C4]](s64)
6315    ; SI: [[COPY32:%[0-9]+]]:_(s32) = COPY [[LSHR22]](s32)
6316    ; SI: G_STORE [[COPY32]](s32), [[PTR_ADD29]](p1) :: (store 1 + 30, addrspace 1)
6317    ; SI: [[PTR_ADD30:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C5]](s64)
6318    ; SI: [[COPY33:%[0-9]+]]:_(s32) = COPY [[LSHR23]](s32)
6319    ; SI: G_STORE [[COPY33]](s32), [[PTR_ADD30]](p1) :: (store 1 + 31, addrspace 1)
6320    ; CI-LABEL: name: test_store_global_v8s32_align1
6321    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6322    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6323    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6324    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
6325    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6326    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6327    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 1, addrspace 1)
6328    ; VI-LABEL: name: test_store_global_v8s32_align1
6329    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6330    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6331    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6332    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<4 x s32>)
6333    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
6334    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
6335    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
6336    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
6337    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
6338    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
6339    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
6340    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
6341    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
6342    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
6343    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
6344    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
6345    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
6346    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
6347    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
6348    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
6349    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
6350    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
6351    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
6352    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
6353    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
6354    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
6355    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
6356    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
6357    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
6358    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
6359    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
6360    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
6361    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
6362    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
6363    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
6364    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
6365    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
6366    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
6367    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
6368    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
6369    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
6370    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
6371    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
6372    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C1]](s32)
6373    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C2]](s32)
6374    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
6375    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
6376    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
6377    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
6378    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
6379    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
6380    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
6381    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
6382    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
6383    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
6384    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
6385    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
6386    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
6387    ; VI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
6388    ; VI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C1]](s32)
6389    ; VI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C2]](s32)
6390    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
6391    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
6392    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
6393    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
6394    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
6395    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
6396    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
6397    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
6398    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
6399    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
6400    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
6401    ; VI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6402    ; VI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
6403    ; VI: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<4 x s32>)
6404    ; VI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
6405    ; VI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C1]](s32)
6406    ; VI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C2]](s32)
6407    ; VI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
6408    ; VI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
6409    ; VI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
6410    ; VI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
6411    ; VI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
6412    ; VI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
6413    ; VI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
6414    ; VI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
6415    ; VI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
6416    ; VI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
6417    ; VI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
6418    ; VI: [[PTR_ADD19:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C6]](s64)
6419    ; VI: [[LSHR15:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
6420    ; VI: [[LSHR16:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C1]](s32)
6421    ; VI: [[LSHR17:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C2]](s32)
6422    ; VI: [[COPY22:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
6423    ; VI: G_STORE [[COPY22]](s32), [[PTR_ADD19]](p1) :: (store 1 + 20, addrspace 1)
6424    ; VI: [[PTR_ADD20:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C3]](s64)
6425    ; VI: [[COPY23:%[0-9]+]]:_(s32) = COPY [[LSHR15]](s32)
6426    ; VI: G_STORE [[COPY23]](s32), [[PTR_ADD20]](p1) :: (store 1 + 21, addrspace 1)
6427    ; VI: [[PTR_ADD21:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C4]](s64)
6428    ; VI: [[COPY24:%[0-9]+]]:_(s32) = COPY [[LSHR16]](s32)
6429    ; VI: G_STORE [[COPY24]](s32), [[PTR_ADD21]](p1) :: (store 1 + 22, addrspace 1)
6430    ; VI: [[PTR_ADD22:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C5]](s64)
6431    ; VI: [[COPY25:%[0-9]+]]:_(s32) = COPY [[LSHR17]](s32)
6432    ; VI: G_STORE [[COPY25]](s32), [[PTR_ADD22]](p1) :: (store 1 + 23, addrspace 1)
6433    ; VI: [[PTR_ADD23:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C7]](s64)
6434    ; VI: [[LSHR18:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C]](s32)
6435    ; VI: [[LSHR19:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C1]](s32)
6436    ; VI: [[LSHR20:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C2]](s32)
6437    ; VI: [[COPY26:%[0-9]+]]:_(s32) = COPY [[UV8]](s32)
6438    ; VI: G_STORE [[COPY26]](s32), [[PTR_ADD23]](p1) :: (store 1 + 24, addrspace 1)
6439    ; VI: [[PTR_ADD24:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C3]](s64)
6440    ; VI: [[COPY27:%[0-9]+]]:_(s32) = COPY [[LSHR18]](s32)
6441    ; VI: G_STORE [[COPY27]](s32), [[PTR_ADD24]](p1) :: (store 1 + 25, addrspace 1)
6442    ; VI: [[PTR_ADD25:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C4]](s64)
6443    ; VI: [[COPY28:%[0-9]+]]:_(s32) = COPY [[LSHR19]](s32)
6444    ; VI: G_STORE [[COPY28]](s32), [[PTR_ADD25]](p1) :: (store 1 + 26, addrspace 1)
6445    ; VI: [[PTR_ADD26:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C5]](s64)
6446    ; VI: [[COPY29:%[0-9]+]]:_(s32) = COPY [[LSHR20]](s32)
6447    ; VI: G_STORE [[COPY29]](s32), [[PTR_ADD26]](p1) :: (store 1 + 27, addrspace 1)
6448    ; VI: [[PTR_ADD27:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C8]](s64)
6449    ; VI: [[LSHR21:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C]](s32)
6450    ; VI: [[LSHR22:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C1]](s32)
6451    ; VI: [[LSHR23:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C2]](s32)
6452    ; VI: [[COPY30:%[0-9]+]]:_(s32) = COPY [[UV9]](s32)
6453    ; VI: G_STORE [[COPY30]](s32), [[PTR_ADD27]](p1) :: (store 1 + 28, addrspace 1)
6454    ; VI: [[PTR_ADD28:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C3]](s64)
6455    ; VI: [[COPY31:%[0-9]+]]:_(s32) = COPY [[LSHR21]](s32)
6456    ; VI: G_STORE [[COPY31]](s32), [[PTR_ADD28]](p1) :: (store 1 + 29, addrspace 1)
6457    ; VI: [[PTR_ADD29:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C4]](s64)
6458    ; VI: [[COPY32:%[0-9]+]]:_(s32) = COPY [[LSHR22]](s32)
6459    ; VI: G_STORE [[COPY32]](s32), [[PTR_ADD29]](p1) :: (store 1 + 30, addrspace 1)
6460    ; VI: [[PTR_ADD30:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C5]](s64)
6461    ; VI: [[COPY33:%[0-9]+]]:_(s32) = COPY [[LSHR23]](s32)
6462    ; VI: G_STORE [[COPY33]](s32), [[PTR_ADD30]](p1) :: (store 1 + 31, addrspace 1)
6463    ; GFX9-LABEL: name: test_store_global_v8s32_align1
6464    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6465    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6466    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6467    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
6468    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6469    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6470    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 1, addrspace 1)
6471    %0:_(p1) = COPY $vgpr0_vgpr1
6472    %1:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6473    G_STORE %1, %0 :: (store 32, align 1, addrspace 1)
6474...
6475
6476---
6477name: test_store_global_v8s32_align2
6478body: |
6479  bb.0:
6480    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6481
6482    ; SI-LABEL: name: test_store_global_v8s32_align2
6483    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6484    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6485    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6486    ; SI: [[UV2:%[0-9]+]]:_(<2 x s32>), [[UV3:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[UV]](<4 x s32>)
6487    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV2]](<2 x s32>)
6488    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
6489    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
6490    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
6491    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
6492    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
6493    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
6494    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
6495    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
6496    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
6497    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
6498    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
6499    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
6500    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
6501    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
6502    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
6503    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
6504    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
6505    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
6506    ; SI: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV3]](<2 x s32>)
6507    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
6508    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
6509    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
6510    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
6511    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
6512    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
6513    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
6514    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
6515    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
6516    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
6517    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
6518    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
6519    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
6520    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6521    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
6522    ; SI: [[UV8:%[0-9]+]]:_(<2 x s32>), [[UV9:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[UV1]](<4 x s32>)
6523    ; SI: [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV8]](<2 x s32>)
6524    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV10]], [[C]](s32)
6525    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV10]](s32)
6526    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
6527    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
6528    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
6529    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
6530    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C2]](s64)
6531    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV11]], [[C]](s32)
6532    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV11]](s32)
6533    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 2 + 20, addrspace 1)
6534    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD9]], [[C1]](s64)
6535    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
6536    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 2 + 22, addrspace 1)
6537    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
6538    ; SI: [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV9]](<2 x s32>)
6539    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV12]], [[C]](s32)
6540    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV12]](s32)
6541    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 2 + 24, addrspace 1)
6542    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C1]](s64)
6543    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
6544    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 2 + 26, addrspace 1)
6545    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C2]](s64)
6546    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV13]], [[C]](s32)
6547    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[UV13]](s32)
6548    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 2 + 28, addrspace 1)
6549    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD13]], [[C1]](s64)
6550    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
6551    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 2 + 30, addrspace 1)
6552    ; CI-LABEL: name: test_store_global_v8s32_align2
6553    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6554    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6555    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6556    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
6557    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6558    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6559    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 2, addrspace 1)
6560    ; VI-LABEL: name: test_store_global_v8s32_align2
6561    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6562    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6563    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6564    ; VI: [[UV2:%[0-9]+]]:_(<2 x s32>), [[UV3:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[UV]](<4 x s32>)
6565    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV2]](<2 x s32>)
6566    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
6567    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
6568    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
6569    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
6570    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
6571    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
6572    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
6573    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
6574    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
6575    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
6576    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
6577    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
6578    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
6579    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
6580    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
6581    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
6582    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
6583    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
6584    ; VI: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV3]](<2 x s32>)
6585    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
6586    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
6587    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
6588    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
6589    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
6590    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
6591    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
6592    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
6593    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
6594    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
6595    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
6596    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
6597    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
6598    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6599    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
6600    ; VI: [[UV8:%[0-9]+]]:_(<2 x s32>), [[UV9:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[UV1]](<4 x s32>)
6601    ; VI: [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV8]](<2 x s32>)
6602    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV10]], [[C]](s32)
6603    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV10]](s32)
6604    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
6605    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
6606    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
6607    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
6608    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C2]](s64)
6609    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV11]], [[C]](s32)
6610    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV11]](s32)
6611    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 2 + 20, addrspace 1)
6612    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD9]], [[C1]](s64)
6613    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
6614    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 2 + 22, addrspace 1)
6615    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
6616    ; VI: [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV9]](<2 x s32>)
6617    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV12]], [[C]](s32)
6618    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV12]](s32)
6619    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 2 + 24, addrspace 1)
6620    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C1]](s64)
6621    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
6622    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 2 + 26, addrspace 1)
6623    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C2]](s64)
6624    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV13]], [[C]](s32)
6625    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[UV13]](s32)
6626    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 2 + 28, addrspace 1)
6627    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD13]], [[C1]](s64)
6628    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
6629    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 2 + 30, addrspace 1)
6630    ; GFX9-LABEL: name: test_store_global_v8s32_align2
6631    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6632    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6633    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6634    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
6635    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6636    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6637    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 2, addrspace 1)
6638    %0:_(p1) = COPY $vgpr0_vgpr1
6639    %1:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6640    G_STORE %1, %0 :: (store 32, align 2, addrspace 1)
6641...
6642
6643---
6644name: test_store_global_v8s32_align4
6645body: |
6646  bb.0:
6647    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6648
6649    ; SI-LABEL: name: test_store_global_v8s32_align4
6650    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6651    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6652    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6653    ; SI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
6654    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6655    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6656    ; SI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
6657    ; CI-LABEL: name: test_store_global_v8s32_align4
6658    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6659    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6660    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6661    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
6662    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6663    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6664    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
6665    ; VI-LABEL: name: test_store_global_v8s32_align4
6666    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6667    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6668    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6669    ; VI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
6670    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6671    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6672    ; VI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
6673    ; GFX9-LABEL: name: test_store_global_v8s32_align4
6674    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6675    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6676    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6677    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
6678    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6679    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6680    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
6681    %0:_(p1) = COPY $vgpr0_vgpr1
6682    %1:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6683    G_STORE %1, %0 :: (store 32, align 4, addrspace 1)
6684...
6685
6686---
6687name: test_store_global_v8s32_align8
6688body: |
6689  bb.0:
6690    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6691
6692    ; SI-LABEL: name: test_store_global_v8s32_align8
6693    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6694    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6695    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6696    ; SI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
6697    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6698    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6699    ; SI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
6700    ; CI-LABEL: name: test_store_global_v8s32_align8
6701    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6702    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6703    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6704    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
6705    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6706    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6707    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
6708    ; VI-LABEL: name: test_store_global_v8s32_align8
6709    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6710    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6711    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6712    ; VI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
6713    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6714    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6715    ; VI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
6716    ; GFX9-LABEL: name: test_store_global_v8s32_align8
6717    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6718    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6719    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6720    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
6721    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6722    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6723    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
6724    %0:_(p1) = COPY $vgpr0_vgpr1
6725    %1:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6726    G_STORE %1, %0 :: (store 32, align 8, addrspace 1)
6727...
6728
6729---
6730name: test_store_global_v8s32_align16
6731body: |
6732  bb.0:
6733    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6734
6735    ; SI-LABEL: name: test_store_global_v8s32_align16
6736    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6737    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6738    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6739    ; SI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
6740    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6741    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6742    ; SI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
6743    ; CI-LABEL: name: test_store_global_v8s32_align16
6744    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6745    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6746    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6747    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
6748    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6749    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6750    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
6751    ; VI-LABEL: name: test_store_global_v8s32_align16
6752    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6753    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6754    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6755    ; VI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
6756    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6757    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6758    ; VI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
6759    ; GFX9-LABEL: name: test_store_global_v8s32_align16
6760    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6761    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6762    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
6763    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
6764    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6765    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6766    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
6767    %0:_(p1) = COPY $vgpr0_vgpr1
6768    %1:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6769    G_STORE %1, %0 :: (store 32, align 16, addrspace 1)
6770...
6771
6772---
6773name: test_store_global_v2s128_align32
6774body: |
6775  bb.0:
6776    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6777
6778    ; SI-LABEL: name: test_store_global_v2s128_align32
6779    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6780    ; SI: [[COPY1:%[0-9]+]]:_(<2 x s128>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6781    ; SI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](<2 x s128>)
6782    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
6783    ; SI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
6784    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6785    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6786    ; SI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
6787    ; CI-LABEL: name: test_store_global_v2s128_align32
6788    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6789    ; CI: [[COPY1:%[0-9]+]]:_(<2 x s128>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6790    ; CI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](<2 x s128>)
6791    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
6792    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
6793    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6794    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6795    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
6796    ; VI-LABEL: name: test_store_global_v2s128_align32
6797    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6798    ; VI: [[COPY1:%[0-9]+]]:_(<2 x s128>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6799    ; VI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](<2 x s128>)
6800    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
6801    ; VI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
6802    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6803    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6804    ; VI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
6805    ; GFX9-LABEL: name: test_store_global_v2s128_align32
6806    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6807    ; GFX9: [[COPY1:%[0-9]+]]:_(<2 x s128>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6808    ; GFX9: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](<2 x s128>)
6809    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
6810    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
6811    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6812    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6813    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
6814    %0:_(p1) = COPY $vgpr0_vgpr1
6815    %1:_(<2 x s128>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6816    G_STORE %1, %0 :: (store 32, align 32, addrspace 1)
6817...
6818
6819---
6820name: test_store_global_s256_align1
6821body: |
6822  bb.0:
6823    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6824
6825    ; SI-LABEL: name: test_store_global_s256_align1
6826    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6827    ; SI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6828    ; SI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
6829    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
6830    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<4 x s32>)
6831    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
6832    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
6833    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
6834    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
6835    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
6836    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
6837    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
6838    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
6839    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
6840    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
6841    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
6842    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
6843    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
6844    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
6845    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
6846    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
6847    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
6848    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
6849    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
6850    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
6851    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
6852    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
6853    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
6854    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
6855    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
6856    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
6857    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
6858    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
6859    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
6860    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
6861    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
6862    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
6863    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
6864    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
6865    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
6866    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
6867    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
6868    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
6869    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
6870    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C1]](s32)
6871    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C2]](s32)
6872    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
6873    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
6874    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
6875    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
6876    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
6877    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
6878    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
6879    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
6880    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
6881    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
6882    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
6883    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
6884    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
6885    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
6886    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C1]](s32)
6887    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C2]](s32)
6888    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
6889    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
6890    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
6891    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
6892    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
6893    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
6894    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
6895    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
6896    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
6897    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
6898    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
6899    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6900    ; SI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
6901    ; SI: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<4 x s32>)
6902    ; SI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
6903    ; SI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C1]](s32)
6904    ; SI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C2]](s32)
6905    ; SI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
6906    ; SI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
6907    ; SI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
6908    ; SI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
6909    ; SI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
6910    ; SI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
6911    ; SI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
6912    ; SI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
6913    ; SI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
6914    ; SI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
6915    ; SI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
6916    ; SI: [[PTR_ADD19:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C6]](s64)
6917    ; SI: [[LSHR15:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
6918    ; SI: [[LSHR16:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C1]](s32)
6919    ; SI: [[LSHR17:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C2]](s32)
6920    ; SI: [[COPY22:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
6921    ; SI: G_STORE [[COPY22]](s32), [[PTR_ADD19]](p1) :: (store 1 + 20, addrspace 1)
6922    ; SI: [[PTR_ADD20:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C3]](s64)
6923    ; SI: [[COPY23:%[0-9]+]]:_(s32) = COPY [[LSHR15]](s32)
6924    ; SI: G_STORE [[COPY23]](s32), [[PTR_ADD20]](p1) :: (store 1 + 21, addrspace 1)
6925    ; SI: [[PTR_ADD21:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C4]](s64)
6926    ; SI: [[COPY24:%[0-9]+]]:_(s32) = COPY [[LSHR16]](s32)
6927    ; SI: G_STORE [[COPY24]](s32), [[PTR_ADD21]](p1) :: (store 1 + 22, addrspace 1)
6928    ; SI: [[PTR_ADD22:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C5]](s64)
6929    ; SI: [[COPY25:%[0-9]+]]:_(s32) = COPY [[LSHR17]](s32)
6930    ; SI: G_STORE [[COPY25]](s32), [[PTR_ADD22]](p1) :: (store 1 + 23, addrspace 1)
6931    ; SI: [[PTR_ADD23:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C7]](s64)
6932    ; SI: [[LSHR18:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C]](s32)
6933    ; SI: [[LSHR19:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C1]](s32)
6934    ; SI: [[LSHR20:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C2]](s32)
6935    ; SI: [[COPY26:%[0-9]+]]:_(s32) = COPY [[UV8]](s32)
6936    ; SI: G_STORE [[COPY26]](s32), [[PTR_ADD23]](p1) :: (store 1 + 24, addrspace 1)
6937    ; SI: [[PTR_ADD24:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C3]](s64)
6938    ; SI: [[COPY27:%[0-9]+]]:_(s32) = COPY [[LSHR18]](s32)
6939    ; SI: G_STORE [[COPY27]](s32), [[PTR_ADD24]](p1) :: (store 1 + 25, addrspace 1)
6940    ; SI: [[PTR_ADD25:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C4]](s64)
6941    ; SI: [[COPY28:%[0-9]+]]:_(s32) = COPY [[LSHR19]](s32)
6942    ; SI: G_STORE [[COPY28]](s32), [[PTR_ADD25]](p1) :: (store 1 + 26, addrspace 1)
6943    ; SI: [[PTR_ADD26:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C5]](s64)
6944    ; SI: [[COPY29:%[0-9]+]]:_(s32) = COPY [[LSHR20]](s32)
6945    ; SI: G_STORE [[COPY29]](s32), [[PTR_ADD26]](p1) :: (store 1 + 27, addrspace 1)
6946    ; SI: [[PTR_ADD27:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C8]](s64)
6947    ; SI: [[LSHR21:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C]](s32)
6948    ; SI: [[LSHR22:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C1]](s32)
6949    ; SI: [[LSHR23:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C2]](s32)
6950    ; SI: [[COPY30:%[0-9]+]]:_(s32) = COPY [[UV9]](s32)
6951    ; SI: G_STORE [[COPY30]](s32), [[PTR_ADD27]](p1) :: (store 1 + 28, addrspace 1)
6952    ; SI: [[PTR_ADD28:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C3]](s64)
6953    ; SI: [[COPY31:%[0-9]+]]:_(s32) = COPY [[LSHR21]](s32)
6954    ; SI: G_STORE [[COPY31]](s32), [[PTR_ADD28]](p1) :: (store 1 + 29, addrspace 1)
6955    ; SI: [[PTR_ADD29:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C4]](s64)
6956    ; SI: [[COPY32:%[0-9]+]]:_(s32) = COPY [[LSHR22]](s32)
6957    ; SI: G_STORE [[COPY32]](s32), [[PTR_ADD29]](p1) :: (store 1 + 30, addrspace 1)
6958    ; SI: [[PTR_ADD30:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C5]](s64)
6959    ; SI: [[COPY33:%[0-9]+]]:_(s32) = COPY [[LSHR23]](s32)
6960    ; SI: G_STORE [[COPY33]](s32), [[PTR_ADD30]](p1) :: (store 1 + 31, addrspace 1)
6961    ; CI-LABEL: name: test_store_global_s256_align1
6962    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6963    ; CI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6964    ; CI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
6965    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
6966    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
6967    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
6968    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
6969    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 1, addrspace 1)
6970    ; VI-LABEL: name: test_store_global_s256_align1
6971    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
6972    ; VI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
6973    ; VI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
6974    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
6975    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<4 x s32>)
6976    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
6977    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
6978    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
6979    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
6980    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
6981    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
6982    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
6983    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
6984    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
6985    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
6986    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
6987    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
6988    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
6989    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
6990    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
6991    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
6992    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
6993    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
6994    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
6995    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
6996    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
6997    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
6998    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
6999    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
7000    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
7001    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
7002    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
7003    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
7004    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
7005    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
7006    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
7007    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
7008    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
7009    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
7010    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
7011    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
7012    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
7013    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
7014    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
7015    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C1]](s32)
7016    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C2]](s32)
7017    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
7018    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
7019    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
7020    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
7021    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
7022    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
7023    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
7024    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
7025    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
7026    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
7027    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
7028    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
7029    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
7030    ; VI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
7031    ; VI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C1]](s32)
7032    ; VI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C2]](s32)
7033    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
7034    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
7035    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
7036    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
7037    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
7038    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
7039    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
7040    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
7041    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
7042    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
7043    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
7044    ; VI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7045    ; VI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
7046    ; VI: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<4 x s32>)
7047    ; VI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
7048    ; VI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C1]](s32)
7049    ; VI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C2]](s32)
7050    ; VI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
7051    ; VI: G_STORE [[COPY18]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
7052    ; VI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
7053    ; VI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
7054    ; VI: G_STORE [[COPY19]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
7055    ; VI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
7056    ; VI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
7057    ; VI: G_STORE [[COPY20]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
7058    ; VI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
7059    ; VI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
7060    ; VI: G_STORE [[COPY21]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
7061    ; VI: [[PTR_ADD19:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C6]](s64)
7062    ; VI: [[LSHR15:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
7063    ; VI: [[LSHR16:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C1]](s32)
7064    ; VI: [[LSHR17:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C2]](s32)
7065    ; VI: [[COPY22:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
7066    ; VI: G_STORE [[COPY22]](s32), [[PTR_ADD19]](p1) :: (store 1 + 20, addrspace 1)
7067    ; VI: [[PTR_ADD20:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C3]](s64)
7068    ; VI: [[COPY23:%[0-9]+]]:_(s32) = COPY [[LSHR15]](s32)
7069    ; VI: G_STORE [[COPY23]](s32), [[PTR_ADD20]](p1) :: (store 1 + 21, addrspace 1)
7070    ; VI: [[PTR_ADD21:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C4]](s64)
7071    ; VI: [[COPY24:%[0-9]+]]:_(s32) = COPY [[LSHR16]](s32)
7072    ; VI: G_STORE [[COPY24]](s32), [[PTR_ADD21]](p1) :: (store 1 + 22, addrspace 1)
7073    ; VI: [[PTR_ADD22:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C5]](s64)
7074    ; VI: [[COPY25:%[0-9]+]]:_(s32) = COPY [[LSHR17]](s32)
7075    ; VI: G_STORE [[COPY25]](s32), [[PTR_ADD22]](p1) :: (store 1 + 23, addrspace 1)
7076    ; VI: [[PTR_ADD23:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C7]](s64)
7077    ; VI: [[LSHR18:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C]](s32)
7078    ; VI: [[LSHR19:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C1]](s32)
7079    ; VI: [[LSHR20:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C2]](s32)
7080    ; VI: [[COPY26:%[0-9]+]]:_(s32) = COPY [[UV8]](s32)
7081    ; VI: G_STORE [[COPY26]](s32), [[PTR_ADD23]](p1) :: (store 1 + 24, addrspace 1)
7082    ; VI: [[PTR_ADD24:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C3]](s64)
7083    ; VI: [[COPY27:%[0-9]+]]:_(s32) = COPY [[LSHR18]](s32)
7084    ; VI: G_STORE [[COPY27]](s32), [[PTR_ADD24]](p1) :: (store 1 + 25, addrspace 1)
7085    ; VI: [[PTR_ADD25:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C4]](s64)
7086    ; VI: [[COPY28:%[0-9]+]]:_(s32) = COPY [[LSHR19]](s32)
7087    ; VI: G_STORE [[COPY28]](s32), [[PTR_ADD25]](p1) :: (store 1 + 26, addrspace 1)
7088    ; VI: [[PTR_ADD26:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C5]](s64)
7089    ; VI: [[COPY29:%[0-9]+]]:_(s32) = COPY [[LSHR20]](s32)
7090    ; VI: G_STORE [[COPY29]](s32), [[PTR_ADD26]](p1) :: (store 1 + 27, addrspace 1)
7091    ; VI: [[PTR_ADD27:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C8]](s64)
7092    ; VI: [[LSHR21:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C]](s32)
7093    ; VI: [[LSHR22:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C1]](s32)
7094    ; VI: [[LSHR23:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C2]](s32)
7095    ; VI: [[COPY30:%[0-9]+]]:_(s32) = COPY [[UV9]](s32)
7096    ; VI: G_STORE [[COPY30]](s32), [[PTR_ADD27]](p1) :: (store 1 + 28, addrspace 1)
7097    ; VI: [[PTR_ADD28:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C3]](s64)
7098    ; VI: [[COPY31:%[0-9]+]]:_(s32) = COPY [[LSHR21]](s32)
7099    ; VI: G_STORE [[COPY31]](s32), [[PTR_ADD28]](p1) :: (store 1 + 29, addrspace 1)
7100    ; VI: [[PTR_ADD29:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C4]](s64)
7101    ; VI: [[COPY32:%[0-9]+]]:_(s32) = COPY [[LSHR22]](s32)
7102    ; VI: G_STORE [[COPY32]](s32), [[PTR_ADD29]](p1) :: (store 1 + 30, addrspace 1)
7103    ; VI: [[PTR_ADD30:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C5]](s64)
7104    ; VI: [[COPY33:%[0-9]+]]:_(s32) = COPY [[LSHR23]](s32)
7105    ; VI: G_STORE [[COPY33]](s32), [[PTR_ADD30]](p1) :: (store 1 + 31, addrspace 1)
7106    ; GFX9-LABEL: name: test_store_global_s256_align1
7107    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7108    ; GFX9: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7109    ; GFX9: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7110    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7111    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
7112    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7113    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7114    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 1, addrspace 1)
7115    %0:_(p1) = COPY $vgpr0_vgpr1
7116    %1:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7117    G_STORE %1, %0 :: (store 32, align 1, addrspace 1)
7118...
7119
7120---
7121name: test_store_global_s256_align2
7122body: |
7123  bb.0:
7124    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7125
7126    ; SI-LABEL: name: test_store_global_s256_align2
7127    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7128    ; SI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7129    ; SI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7130    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7131    ; SI: [[UV2:%[0-9]+]]:_(<2 x s32>), [[UV3:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[UV]](<4 x s32>)
7132    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV2]](<2 x s32>)
7133    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
7134    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
7135    ; SI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
7136    ; SI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
7137    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
7138    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
7139    ; SI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
7140    ; SI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
7141    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
7142    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
7143    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
7144    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
7145    ; SI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
7146    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
7147    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
7148    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
7149    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
7150    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
7151    ; SI: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV3]](<2 x s32>)
7152    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
7153    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
7154    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
7155    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
7156    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
7157    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
7158    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
7159    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
7160    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
7161    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
7162    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
7163    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
7164    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
7165    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7166    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
7167    ; SI: [[UV8:%[0-9]+]]:_(<2 x s32>), [[UV9:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[UV1]](<4 x s32>)
7168    ; SI: [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV8]](<2 x s32>)
7169    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV10]], [[C]](s32)
7170    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV10]](s32)
7171    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
7172    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
7173    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
7174    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
7175    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C2]](s64)
7176    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV11]], [[C]](s32)
7177    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV11]](s32)
7178    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 2 + 20, addrspace 1)
7179    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD9]], [[C1]](s64)
7180    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
7181    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 2 + 22, addrspace 1)
7182    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
7183    ; SI: [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV9]](<2 x s32>)
7184    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV12]], [[C]](s32)
7185    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV12]](s32)
7186    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 2 + 24, addrspace 1)
7187    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C1]](s64)
7188    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
7189    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 2 + 26, addrspace 1)
7190    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C2]](s64)
7191    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV13]], [[C]](s32)
7192    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[UV13]](s32)
7193    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 2 + 28, addrspace 1)
7194    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD13]], [[C1]](s64)
7195    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
7196    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 2 + 30, addrspace 1)
7197    ; CI-LABEL: name: test_store_global_s256_align2
7198    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7199    ; CI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7200    ; CI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7201    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7202    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
7203    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7204    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7205    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 2, addrspace 1)
7206    ; VI-LABEL: name: test_store_global_s256_align2
7207    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7208    ; VI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7209    ; VI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7210    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7211    ; VI: [[UV2:%[0-9]+]]:_(<2 x s32>), [[UV3:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[UV]](<4 x s32>)
7212    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV2]](<2 x s32>)
7213    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
7214    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
7215    ; VI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
7216    ; VI: G_STORE [[COPY2]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
7217    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
7218    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
7219    ; VI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
7220    ; VI: G_STORE [[COPY3]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
7221    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
7222    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
7223    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
7224    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
7225    ; VI: G_STORE [[COPY4]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
7226    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
7227    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
7228    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
7229    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
7230    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
7231    ; VI: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV3]](<2 x s32>)
7232    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
7233    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
7234    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
7235    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
7236    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
7237    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
7238    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
7239    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
7240    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
7241    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
7242    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
7243    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
7244    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
7245    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7246    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
7247    ; VI: [[UV8:%[0-9]+]]:_(<2 x s32>), [[UV9:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[UV1]](<4 x s32>)
7248    ; VI: [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV8]](<2 x s32>)
7249    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV10]], [[C]](s32)
7250    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV10]](s32)
7251    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
7252    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
7253    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
7254    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
7255    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C2]](s64)
7256    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV11]], [[C]](s32)
7257    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV11]](s32)
7258    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD9]](p1) :: (store 2 + 20, addrspace 1)
7259    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD9]], [[C1]](s64)
7260    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
7261    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD10]](p1) :: (store 2 + 22, addrspace 1)
7262    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
7263    ; VI: [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV9]](<2 x s32>)
7264    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV12]], [[C]](s32)
7265    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV12]](s32)
7266    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD11]](p1) :: (store 2 + 24, addrspace 1)
7267    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C1]](s64)
7268    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
7269    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD12]](p1) :: (store 2 + 26, addrspace 1)
7270    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C2]](s64)
7271    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV13]], [[C]](s32)
7272    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[UV13]](s32)
7273    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD13]](p1) :: (store 2 + 28, addrspace 1)
7274    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD13]], [[C1]](s64)
7275    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
7276    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD14]](p1) :: (store 2 + 30, addrspace 1)
7277    ; GFX9-LABEL: name: test_store_global_s256_align2
7278    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7279    ; GFX9: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7280    ; GFX9: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7281    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7282    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
7283    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7284    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7285    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 2, addrspace 1)
7286    %0:_(p1) = COPY $vgpr0_vgpr1
7287    %1:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7288    G_STORE %1, %0 :: (store 32, align 2, addrspace 1)
7289...
7290
7291---
7292name: test_store_global_s256_align4
7293body: |
7294  bb.0:
7295    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7296
7297    ; SI-LABEL: name: test_store_global_s256_align4
7298    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7299    ; SI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7300    ; SI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7301    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7302    ; SI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
7303    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7304    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7305    ; SI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
7306    ; CI-LABEL: name: test_store_global_s256_align4
7307    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7308    ; CI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7309    ; CI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7310    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7311    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
7312    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7313    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7314    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
7315    ; VI-LABEL: name: test_store_global_s256_align4
7316    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7317    ; VI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7318    ; VI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7319    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7320    ; VI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
7321    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7322    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7323    ; VI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
7324    ; GFX9-LABEL: name: test_store_global_s256_align4
7325    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7326    ; GFX9: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7327    ; GFX9: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7328    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7329    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
7330    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7331    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7332    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
7333    %0:_(p1) = COPY $vgpr0_vgpr1
7334    %1:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7335    G_STORE %1, %0 :: (store 32, align 4, addrspace 1)
7336...
7337
7338---
7339name: test_store_global_s256_align8
7340body: |
7341  bb.0:
7342    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7343
7344    ; SI-LABEL: name: test_store_global_s256_align8
7345    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7346    ; SI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7347    ; SI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7348    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7349    ; SI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
7350    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7351    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7352    ; SI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
7353    ; CI-LABEL: name: test_store_global_s256_align8
7354    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7355    ; CI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7356    ; CI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7357    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7358    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
7359    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7360    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7361    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
7362    ; VI-LABEL: name: test_store_global_s256_align8
7363    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7364    ; VI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7365    ; VI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7366    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7367    ; VI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
7368    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7369    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7370    ; VI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
7371    ; GFX9-LABEL: name: test_store_global_s256_align8
7372    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7373    ; GFX9: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7374    ; GFX9: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7375    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7376    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
7377    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7378    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7379    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
7380    %0:_(p1) = COPY $vgpr0_vgpr1
7381    %1:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7382    G_STORE %1, %0 :: (store 32, align 8, addrspace 1)
7383...
7384
7385---
7386name: test_store_global_s256_align16
7387body: |
7388  bb.0:
7389    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7390
7391    ; SI-LABEL: name: test_store_global_s256_align16
7392    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7393    ; SI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7394    ; SI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7395    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7396    ; SI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
7397    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7398    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7399    ; SI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7400    ; CI-LABEL: name: test_store_global_s256_align16
7401    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7402    ; CI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7403    ; CI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7404    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7405    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
7406    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7407    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7408    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7409    ; VI-LABEL: name: test_store_global_s256_align16
7410    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7411    ; VI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7412    ; VI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7413    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7414    ; VI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
7415    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7416    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7417    ; VI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7418    ; GFX9-LABEL: name: test_store_global_s256_align16
7419    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7420    ; GFX9: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7421    ; GFX9: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7422    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7423    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
7424    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7425    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7426    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7427    %0:_(p1) = COPY $vgpr0_vgpr1
7428    %1:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7429    G_STORE %1, %0 :: (store 32, align 16, addrspace 1)
7430...
7431
7432---
7433name: test_store_global_s256_align32
7434body: |
7435  bb.0:
7436    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7437
7438    ; SI-LABEL: name: test_store_global_s256_align32
7439    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7440    ; SI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7441    ; SI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7442    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7443    ; SI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
7444    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7445    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7446    ; SI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7447    ; CI-LABEL: name: test_store_global_s256_align32
7448    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7449    ; CI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7450    ; CI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7451    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7452    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
7453    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7454    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7455    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7456    ; VI-LABEL: name: test_store_global_s256_align32
7457    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7458    ; VI: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7459    ; VI: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7460    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7461    ; VI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
7462    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7463    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7464    ; VI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7465    ; GFX9-LABEL: name: test_store_global_s256_align32
7466    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7467    ; GFX9: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7468    ; GFX9: [[BITCAST:%[0-9]+]]:_(<8 x s32>) = G_BITCAST [[COPY1]](s256)
7469    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[BITCAST]](<8 x s32>)
7470    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
7471    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7472    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7473    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7474    %0:_(p1) = COPY $vgpr0_vgpr1
7475    %1:_(s256) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7476    G_STORE %1, %0 :: (store 32, align 32, addrspace 1)
7477...
7478
7479---
7480name: test_store_global_v8s32_align32
7481body: |
7482  bb.0:
7483    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7484
7485    ; SI-LABEL: name: test_store_global_v8s32_align32
7486    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7487    ; SI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7488    ; SI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
7489    ; SI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
7490    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7491    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7492    ; SI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7493    ; CI-LABEL: name: test_store_global_v8s32_align32
7494    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7495    ; CI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7496    ; CI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
7497    ; CI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
7498    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7499    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7500    ; CI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7501    ; VI-LABEL: name: test_store_global_v8s32_align32
7502    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7503    ; VI: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7504    ; VI: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
7505    ; VI: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
7506    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7507    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7508    ; VI: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7509    ; GFX9-LABEL: name: test_store_global_v8s32_align32
7510    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7511    ; GFX9: [[COPY1:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7512    ; GFX9: [[UV:%[0-9]+]]:_(<4 x s32>), [[UV1:%[0-9]+]]:_(<4 x s32>) = G_UNMERGE_VALUES [[COPY1]](<8 x s32>)
7513    ; GFX9: G_STORE [[UV]](<4 x s32>), [[COPY]](p1) :: (store 16, align 32, addrspace 1)
7514    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7515    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7516    ; GFX9: G_STORE [[UV1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
7517    %0:_(p1) = COPY $vgpr0_vgpr1
7518    %1:_(<8 x s32>) = COPY $vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9
7519    G_STORE %1, %0 :: (store 32, align 32, addrspace 1)
7520...
7521
7522---
7523name: test_store_global_v9s32_align1
7524body: |
7525  bb.0:
7526    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10
7527
7528    ; SI-LABEL: name: test_store_global_v9s32_align1
7529    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7530    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
7531    ; SI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
7532    ; SI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
7533    ; SI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
7534    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
7535    ; SI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
7536    ; SI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
7537    ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
7538    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
7539    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
7540    ; SI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
7541    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
7542    ; SI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
7543    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
7544    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
7545    ; SI: G_STORE [[COPY4]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
7546    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
7547    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
7548    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
7549    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
7550    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
7551    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
7552    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
7553    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
7554    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
7555    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
7556    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
7557    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
7558    ; SI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
7559    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
7560    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
7561    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
7562    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
7563    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
7564    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
7565    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
7566    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
7567    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
7568    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
7569    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
7570    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
7571    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
7572    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
7573    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
7574    ; SI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
7575    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
7576    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
7577    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
7578    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
7579    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
7580    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
7581    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
7582    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
7583    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
7584    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
7585    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
7586    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
7587    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
7588    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
7589    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
7590    ; SI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
7591    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
7592    ; SI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
7593    ; SI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
7594    ; SI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
7595    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
7596    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
7597    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
7598    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
7599    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
7600    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
7601    ; SI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
7602    ; SI: G_STORE [[COPY18]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
7603    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
7604    ; SI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
7605    ; SI: G_STORE [[COPY19]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
7606    ; SI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7607    ; SI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
7608    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT1]](<4 x s32>)
7609    ; SI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
7610    ; SI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C1]](s32)
7611    ; SI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C2]](s32)
7612    ; SI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
7613    ; SI: G_STORE [[COPY20]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
7614    ; SI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
7615    ; SI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
7616    ; SI: G_STORE [[COPY21]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
7617    ; SI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
7618    ; SI: [[COPY22:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
7619    ; SI: G_STORE [[COPY22]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
7620    ; SI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
7621    ; SI: [[COPY23:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
7622    ; SI: G_STORE [[COPY23]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
7623    ; SI: [[PTR_ADD19:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C6]](s64)
7624    ; SI: [[LSHR15:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
7625    ; SI: [[LSHR16:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C1]](s32)
7626    ; SI: [[LSHR17:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C2]](s32)
7627    ; SI: [[COPY24:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
7628    ; SI: G_STORE [[COPY24]](s32), [[PTR_ADD19]](p1) :: (store 1 + 20, addrspace 1)
7629    ; SI: [[PTR_ADD20:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C3]](s64)
7630    ; SI: [[COPY25:%[0-9]+]]:_(s32) = COPY [[LSHR15]](s32)
7631    ; SI: G_STORE [[COPY25]](s32), [[PTR_ADD20]](p1) :: (store 1 + 21, addrspace 1)
7632    ; SI: [[PTR_ADD21:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C4]](s64)
7633    ; SI: [[COPY26:%[0-9]+]]:_(s32) = COPY [[LSHR16]](s32)
7634    ; SI: G_STORE [[COPY26]](s32), [[PTR_ADD21]](p1) :: (store 1 + 22, addrspace 1)
7635    ; SI: [[PTR_ADD22:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C5]](s64)
7636    ; SI: [[COPY27:%[0-9]+]]:_(s32) = COPY [[LSHR17]](s32)
7637    ; SI: G_STORE [[COPY27]](s32), [[PTR_ADD22]](p1) :: (store 1 + 23, addrspace 1)
7638    ; SI: [[PTR_ADD23:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C7]](s64)
7639    ; SI: [[LSHR18:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
7640    ; SI: [[LSHR19:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C1]](s32)
7641    ; SI: [[LSHR20:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C2]](s32)
7642    ; SI: [[COPY28:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
7643    ; SI: G_STORE [[COPY28]](s32), [[PTR_ADD23]](p1) :: (store 1 + 24, addrspace 1)
7644    ; SI: [[PTR_ADD24:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C3]](s64)
7645    ; SI: [[COPY29:%[0-9]+]]:_(s32) = COPY [[LSHR18]](s32)
7646    ; SI: G_STORE [[COPY29]](s32), [[PTR_ADD24]](p1) :: (store 1 + 25, addrspace 1)
7647    ; SI: [[PTR_ADD25:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C4]](s64)
7648    ; SI: [[COPY30:%[0-9]+]]:_(s32) = COPY [[LSHR19]](s32)
7649    ; SI: G_STORE [[COPY30]](s32), [[PTR_ADD25]](p1) :: (store 1 + 26, addrspace 1)
7650    ; SI: [[PTR_ADD26:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C5]](s64)
7651    ; SI: [[COPY31:%[0-9]+]]:_(s32) = COPY [[LSHR20]](s32)
7652    ; SI: G_STORE [[COPY31]](s32), [[PTR_ADD26]](p1) :: (store 1 + 27, addrspace 1)
7653    ; SI: [[PTR_ADD27:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C8]](s64)
7654    ; SI: [[LSHR21:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
7655    ; SI: [[LSHR22:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C1]](s32)
7656    ; SI: [[LSHR23:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C2]](s32)
7657    ; SI: [[COPY32:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
7658    ; SI: G_STORE [[COPY32]](s32), [[PTR_ADD27]](p1) :: (store 1 + 28, addrspace 1)
7659    ; SI: [[PTR_ADD28:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C3]](s64)
7660    ; SI: [[COPY33:%[0-9]+]]:_(s32) = COPY [[LSHR21]](s32)
7661    ; SI: G_STORE [[COPY33]](s32), [[PTR_ADD28]](p1) :: (store 1 + 29, addrspace 1)
7662    ; SI: [[PTR_ADD29:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C4]](s64)
7663    ; SI: [[COPY34:%[0-9]+]]:_(s32) = COPY [[LSHR22]](s32)
7664    ; SI: G_STORE [[COPY34]](s32), [[PTR_ADD29]](p1) :: (store 1 + 30, addrspace 1)
7665    ; SI: [[PTR_ADD30:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C5]](s64)
7666    ; SI: [[COPY35:%[0-9]+]]:_(s32) = COPY [[LSHR23]](s32)
7667    ; SI: G_STORE [[COPY35]](s32), [[PTR_ADD30]](p1) :: (store 1 + 31, addrspace 1)
7668    ; SI: [[C10:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
7669    ; SI: [[PTR_ADD31:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C10]](s64)
7670    ; SI: [[LSHR24:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT2]], [[C]](s32)
7671    ; SI: [[LSHR25:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT2]], [[C1]](s32)
7672    ; SI: [[LSHR26:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT2]], [[C2]](s32)
7673    ; SI: [[COPY36:%[0-9]+]]:_(s32) = COPY [[EXTRACT2]](s32)
7674    ; SI: G_STORE [[COPY36]](s32), [[PTR_ADD31]](p1) :: (store 1 + 32, addrspace 1)
7675    ; SI: [[PTR_ADD32:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD31]], [[C3]](s64)
7676    ; SI: [[COPY37:%[0-9]+]]:_(s32) = COPY [[LSHR24]](s32)
7677    ; SI: G_STORE [[COPY37]](s32), [[PTR_ADD32]](p1) :: (store 1 + 33, addrspace 1)
7678    ; SI: [[PTR_ADD33:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD31]], [[C4]](s64)
7679    ; SI: [[COPY38:%[0-9]+]]:_(s32) = COPY [[LSHR25]](s32)
7680    ; SI: G_STORE [[COPY38]](s32), [[PTR_ADD33]](p1) :: (store 1 + 34, addrspace 1)
7681    ; SI: [[PTR_ADD34:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD31]], [[C5]](s64)
7682    ; SI: [[COPY39:%[0-9]+]]:_(s32) = COPY [[LSHR26]](s32)
7683    ; SI: G_STORE [[COPY39]](s32), [[PTR_ADD34]](p1) :: (store 1 + 35, addrspace 1)
7684    ; CI-LABEL: name: test_store_global_v9s32_align1
7685    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7686    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
7687    ; CI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
7688    ; CI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
7689    ; CI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
7690    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
7691    ; CI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
7692    ; CI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
7693    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
7694    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7695    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7696    ; CI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 1, addrspace 1)
7697    ; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
7698    ; CI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
7699    ; CI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 1, addrspace 1)
7700    ; VI-LABEL: name: test_store_global_v9s32_align1
7701    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7702    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
7703    ; VI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
7704    ; VI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
7705    ; VI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
7706    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
7707    ; VI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
7708    ; VI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
7709    ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
7710    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
7711    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
7712    ; VI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
7713    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
7714    ; VI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
7715    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
7716    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
7717    ; VI: G_STORE [[COPY4]](s32), [[COPY]](p1) :: (store 1, addrspace 1)
7718    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
7719    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
7720    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
7721    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD]](p1) :: (store 1 + 1, addrspace 1)
7722    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
7723    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
7724    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
7725    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD1]](p1) :: (store 1 + 2, addrspace 1)
7726    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
7727    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
7728    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
7729    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD2]](p1) :: (store 1 + 3, addrspace 1)
7730    ; VI: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
7731    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C6]](s64)
7732    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
7733    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
7734    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
7735    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
7736    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD3]](p1) :: (store 1 + 4, addrspace 1)
7737    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C3]](s64)
7738    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
7739    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD4]](p1) :: (store 1 + 5, addrspace 1)
7740    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C4]](s64)
7741    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
7742    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD5]](p1) :: (store 1 + 6, addrspace 1)
7743    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C5]](s64)
7744    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
7745    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD6]](p1) :: (store 1 + 7, addrspace 1)
7746    ; VI: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
7747    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C7]](s64)
7748    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
7749    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
7750    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
7751    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
7752    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD7]](p1) :: (store 1 + 8, addrspace 1)
7753    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
7754    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
7755    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD8]](p1) :: (store 1 + 9, addrspace 1)
7756    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C4]](s64)
7757    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
7758    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD9]](p1) :: (store 1 + 10, addrspace 1)
7759    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C5]](s64)
7760    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
7761    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD10]](p1) :: (store 1 + 11, addrspace 1)
7762    ; VI: [[C8:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
7763    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C8]](s64)
7764    ; VI: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
7765    ; VI: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C1]](s32)
7766    ; VI: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C2]](s32)
7767    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
7768    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD11]](p1) :: (store 1 + 12, addrspace 1)
7769    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C3]](s64)
7770    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
7771    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD12]](p1) :: (store 1 + 13, addrspace 1)
7772    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C4]](s64)
7773    ; VI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
7774    ; VI: G_STORE [[COPY18]](s32), [[PTR_ADD13]](p1) :: (store 1 + 14, addrspace 1)
7775    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C5]](s64)
7776    ; VI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
7777    ; VI: G_STORE [[COPY19]](s32), [[PTR_ADD14]](p1) :: (store 1 + 15, addrspace 1)
7778    ; VI: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7779    ; VI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C9]](s64)
7780    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[EXTRACT1]](<4 x s32>)
7781    ; VI: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
7782    ; VI: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C1]](s32)
7783    ; VI: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C2]](s32)
7784    ; VI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
7785    ; VI: G_STORE [[COPY20]](s32), [[PTR_ADD15]](p1) :: (store 1 + 16, addrspace 1)
7786    ; VI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C3]](s64)
7787    ; VI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
7788    ; VI: G_STORE [[COPY21]](s32), [[PTR_ADD16]](p1) :: (store 1 + 17, addrspace 1)
7789    ; VI: [[PTR_ADD17:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C4]](s64)
7790    ; VI: [[COPY22:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
7791    ; VI: G_STORE [[COPY22]](s32), [[PTR_ADD17]](p1) :: (store 1 + 18, addrspace 1)
7792    ; VI: [[PTR_ADD18:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C5]](s64)
7793    ; VI: [[COPY23:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
7794    ; VI: G_STORE [[COPY23]](s32), [[PTR_ADD18]](p1) :: (store 1 + 19, addrspace 1)
7795    ; VI: [[PTR_ADD19:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C6]](s64)
7796    ; VI: [[LSHR15:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
7797    ; VI: [[LSHR16:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C1]](s32)
7798    ; VI: [[LSHR17:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C2]](s32)
7799    ; VI: [[COPY24:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
7800    ; VI: G_STORE [[COPY24]](s32), [[PTR_ADD19]](p1) :: (store 1 + 20, addrspace 1)
7801    ; VI: [[PTR_ADD20:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C3]](s64)
7802    ; VI: [[COPY25:%[0-9]+]]:_(s32) = COPY [[LSHR15]](s32)
7803    ; VI: G_STORE [[COPY25]](s32), [[PTR_ADD20]](p1) :: (store 1 + 21, addrspace 1)
7804    ; VI: [[PTR_ADD21:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C4]](s64)
7805    ; VI: [[COPY26:%[0-9]+]]:_(s32) = COPY [[LSHR16]](s32)
7806    ; VI: G_STORE [[COPY26]](s32), [[PTR_ADD21]](p1) :: (store 1 + 22, addrspace 1)
7807    ; VI: [[PTR_ADD22:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD19]], [[C5]](s64)
7808    ; VI: [[COPY27:%[0-9]+]]:_(s32) = COPY [[LSHR17]](s32)
7809    ; VI: G_STORE [[COPY27]](s32), [[PTR_ADD22]](p1) :: (store 1 + 23, addrspace 1)
7810    ; VI: [[PTR_ADD23:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C7]](s64)
7811    ; VI: [[LSHR18:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C]](s32)
7812    ; VI: [[LSHR19:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C1]](s32)
7813    ; VI: [[LSHR20:%[0-9]+]]:_(s32) = G_LSHR [[UV6]], [[C2]](s32)
7814    ; VI: [[COPY28:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
7815    ; VI: G_STORE [[COPY28]](s32), [[PTR_ADD23]](p1) :: (store 1 + 24, addrspace 1)
7816    ; VI: [[PTR_ADD24:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C3]](s64)
7817    ; VI: [[COPY29:%[0-9]+]]:_(s32) = COPY [[LSHR18]](s32)
7818    ; VI: G_STORE [[COPY29]](s32), [[PTR_ADD24]](p1) :: (store 1 + 25, addrspace 1)
7819    ; VI: [[PTR_ADD25:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C4]](s64)
7820    ; VI: [[COPY30:%[0-9]+]]:_(s32) = COPY [[LSHR19]](s32)
7821    ; VI: G_STORE [[COPY30]](s32), [[PTR_ADD25]](p1) :: (store 1 + 26, addrspace 1)
7822    ; VI: [[PTR_ADD26:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD23]], [[C5]](s64)
7823    ; VI: [[COPY31:%[0-9]+]]:_(s32) = COPY [[LSHR20]](s32)
7824    ; VI: G_STORE [[COPY31]](s32), [[PTR_ADD26]](p1) :: (store 1 + 27, addrspace 1)
7825    ; VI: [[PTR_ADD27:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C8]](s64)
7826    ; VI: [[LSHR21:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C]](s32)
7827    ; VI: [[LSHR22:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C1]](s32)
7828    ; VI: [[LSHR23:%[0-9]+]]:_(s32) = G_LSHR [[UV7]], [[C2]](s32)
7829    ; VI: [[COPY32:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
7830    ; VI: G_STORE [[COPY32]](s32), [[PTR_ADD27]](p1) :: (store 1 + 28, addrspace 1)
7831    ; VI: [[PTR_ADD28:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C3]](s64)
7832    ; VI: [[COPY33:%[0-9]+]]:_(s32) = COPY [[LSHR21]](s32)
7833    ; VI: G_STORE [[COPY33]](s32), [[PTR_ADD28]](p1) :: (store 1 + 29, addrspace 1)
7834    ; VI: [[PTR_ADD29:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C4]](s64)
7835    ; VI: [[COPY34:%[0-9]+]]:_(s32) = COPY [[LSHR22]](s32)
7836    ; VI: G_STORE [[COPY34]](s32), [[PTR_ADD29]](p1) :: (store 1 + 30, addrspace 1)
7837    ; VI: [[PTR_ADD30:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD27]], [[C5]](s64)
7838    ; VI: [[COPY35:%[0-9]+]]:_(s32) = COPY [[LSHR23]](s32)
7839    ; VI: G_STORE [[COPY35]](s32), [[PTR_ADD30]](p1) :: (store 1 + 31, addrspace 1)
7840    ; VI: [[C10:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
7841    ; VI: [[PTR_ADD31:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C10]](s64)
7842    ; VI: [[LSHR24:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT2]], [[C]](s32)
7843    ; VI: [[LSHR25:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT2]], [[C1]](s32)
7844    ; VI: [[LSHR26:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT2]], [[C2]](s32)
7845    ; VI: [[COPY36:%[0-9]+]]:_(s32) = COPY [[EXTRACT2]](s32)
7846    ; VI: G_STORE [[COPY36]](s32), [[PTR_ADD31]](p1) :: (store 1 + 32, addrspace 1)
7847    ; VI: [[PTR_ADD32:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD31]], [[C3]](s64)
7848    ; VI: [[COPY37:%[0-9]+]]:_(s32) = COPY [[LSHR24]](s32)
7849    ; VI: G_STORE [[COPY37]](s32), [[PTR_ADD32]](p1) :: (store 1 + 33, addrspace 1)
7850    ; VI: [[PTR_ADD33:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD31]], [[C4]](s64)
7851    ; VI: [[COPY38:%[0-9]+]]:_(s32) = COPY [[LSHR25]](s32)
7852    ; VI: G_STORE [[COPY38]](s32), [[PTR_ADD33]](p1) :: (store 1 + 34, addrspace 1)
7853    ; VI: [[PTR_ADD34:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD31]], [[C5]](s64)
7854    ; VI: [[COPY39:%[0-9]+]]:_(s32) = COPY [[LSHR26]](s32)
7855    ; VI: G_STORE [[COPY39]](s32), [[PTR_ADD34]](p1) :: (store 1 + 35, addrspace 1)
7856    ; GFX9-LABEL: name: test_store_global_v9s32_align1
7857    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7858    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
7859    ; GFX9: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
7860    ; GFX9: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
7861    ; GFX9: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
7862    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
7863    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
7864    ; GFX9: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
7865    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 1, addrspace 1)
7866    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7867    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7868    ; GFX9: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 1, addrspace 1)
7869    ; GFX9: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
7870    ; GFX9: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
7871    ; GFX9: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 1, addrspace 1)
7872    %0:_(p1) = COPY $vgpr0_vgpr1
7873    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
7874    %2:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
7875    %3:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
7876    %4:_(<9 x s32>) = G_CONCAT_VECTORS %1, %2, %3
7877    G_STORE %4, %0 :: (store 36, align 1, addrspace 1)
7878...
7879
7880---
7881name: test_store_global_v9s32_align2
7882body: |
7883  bb.0:
7884    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10
7885
7886    ; SI-LABEL: name: test_store_global_v9s32_align2
7887    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7888    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
7889    ; SI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
7890    ; SI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
7891    ; SI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
7892    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
7893    ; SI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
7894    ; SI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
7895    ; SI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
7896    ; SI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
7897    ; SI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
7898    ; SI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
7899    ; SI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
7900    ; SI: G_STORE [[COPY4]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
7901    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
7902    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
7903    ; SI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
7904    ; SI: G_STORE [[COPY5]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
7905    ; SI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
7906    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
7907    ; SI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
7908    ; SI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
7909    ; SI: G_STORE [[COPY6]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
7910    ; SI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
7911    ; SI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
7912    ; SI: G_STORE [[COPY7]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
7913    ; SI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
7914    ; SI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
7915    ; SI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
7916    ; SI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
7917    ; SI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
7918    ; SI: G_STORE [[COPY8]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
7919    ; SI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
7920    ; SI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
7921    ; SI: G_STORE [[COPY9]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
7922    ; SI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
7923    ; SI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
7924    ; SI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
7925    ; SI: G_STORE [[COPY10]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
7926    ; SI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
7927    ; SI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
7928    ; SI: G_STORE [[COPY11]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
7929    ; SI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7930    ; SI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
7931    ; SI: [[UV6:%[0-9]+]]:_(<2 x s32>), [[UV7:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[EXTRACT1]](<4 x s32>)
7932    ; SI: [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV6]](<2 x s32>)
7933    ; SI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C]](s32)
7934    ; SI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV8]](s32)
7935    ; SI: G_STORE [[COPY12]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
7936    ; SI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
7937    ; SI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
7938    ; SI: G_STORE [[COPY13]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
7939    ; SI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C2]](s64)
7940    ; SI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C]](s32)
7941    ; SI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV9]](s32)
7942    ; SI: G_STORE [[COPY14]](s32), [[PTR_ADD9]](p1) :: (store 2 + 20, addrspace 1)
7943    ; SI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD9]], [[C1]](s64)
7944    ; SI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
7945    ; SI: G_STORE [[COPY15]](s32), [[PTR_ADD10]](p1) :: (store 2 + 22, addrspace 1)
7946    ; SI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
7947    ; SI: [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV7]](<2 x s32>)
7948    ; SI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV10]], [[C]](s32)
7949    ; SI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[UV10]](s32)
7950    ; SI: G_STORE [[COPY16]](s32), [[PTR_ADD11]](p1) :: (store 2 + 24, addrspace 1)
7951    ; SI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C1]](s64)
7952    ; SI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
7953    ; SI: G_STORE [[COPY17]](s32), [[PTR_ADD12]](p1) :: (store 2 + 26, addrspace 1)
7954    ; SI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C2]](s64)
7955    ; SI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV11]], [[C]](s32)
7956    ; SI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[UV11]](s32)
7957    ; SI: G_STORE [[COPY18]](s32), [[PTR_ADD13]](p1) :: (store 2 + 28, addrspace 1)
7958    ; SI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD13]], [[C1]](s64)
7959    ; SI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
7960    ; SI: G_STORE [[COPY19]](s32), [[PTR_ADD14]](p1) :: (store 2 + 30, addrspace 1)
7961    ; SI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
7962    ; SI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
7963    ; SI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT2]], [[C]](s32)
7964    ; SI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[EXTRACT2]](s32)
7965    ; SI: G_STORE [[COPY20]](s32), [[PTR_ADD15]](p1) :: (store 2 + 32, addrspace 1)
7966    ; SI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C1]](s64)
7967    ; SI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
7968    ; SI: G_STORE [[COPY21]](s32), [[PTR_ADD16]](p1) :: (store 2 + 34, addrspace 1)
7969    ; CI-LABEL: name: test_store_global_v9s32_align2
7970    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7971    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
7972    ; CI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
7973    ; CI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
7974    ; CI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
7975    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
7976    ; CI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
7977    ; CI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
7978    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
7979    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
7980    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
7981    ; CI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 2, addrspace 1)
7982    ; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
7983    ; CI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
7984    ; CI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 2, addrspace 1)
7985    ; VI-LABEL: name: test_store_global_v9s32_align2
7986    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
7987    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
7988    ; VI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
7989    ; VI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
7990    ; VI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
7991    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
7992    ; VI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
7993    ; VI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
7994    ; VI: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[EXTRACT]](<4 x s32>)
7995    ; VI: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](<2 x s32>)
7996    ; VI: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
7997    ; VI: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
7998    ; VI: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
7999    ; VI: G_STORE [[COPY4]](s32), [[COPY]](p1) :: (store 2, addrspace 1)
8000    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
8001    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8002    ; VI: [[COPY5:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
8003    ; VI: G_STORE [[COPY5]](s32), [[PTR_ADD]](p1) :: (store 2 + 2, addrspace 1)
8004    ; VI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
8005    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
8006    ; VI: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV3]], [[C]](s32)
8007    ; VI: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
8008    ; VI: G_STORE [[COPY6]](s32), [[PTR_ADD1]](p1) :: (store 2 + 4, addrspace 1)
8009    ; VI: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD1]], [[C1]](s64)
8010    ; VI: [[COPY7:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
8011    ; VI: G_STORE [[COPY7]](s32), [[PTR_ADD2]](p1) :: (store 2 + 6, addrspace 1)
8012    ; VI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
8013    ; VI: [[PTR_ADD3:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C3]](s64)
8014    ; VI: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](<2 x s32>)
8015    ; VI: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV4]], [[C]](s32)
8016    ; VI: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
8017    ; VI: G_STORE [[COPY8]](s32), [[PTR_ADD3]](p1) :: (store 2 + 8, addrspace 1)
8018    ; VI: [[PTR_ADD4:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C1]](s64)
8019    ; VI: [[COPY9:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
8020    ; VI: G_STORE [[COPY9]](s32), [[PTR_ADD4]](p1) :: (store 2 + 10, addrspace 1)
8021    ; VI: [[PTR_ADD5:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s64)
8022    ; VI: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV5]], [[C]](s32)
8023    ; VI: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
8024    ; VI: G_STORE [[COPY10]](s32), [[PTR_ADD5]](p1) :: (store 2 + 12, addrspace 1)
8025    ; VI: [[PTR_ADD6:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD5]], [[C1]](s64)
8026    ; VI: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
8027    ; VI: G_STORE [[COPY11]](s32), [[PTR_ADD6]](p1) :: (store 2 + 14, addrspace 1)
8028    ; VI: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8029    ; VI: [[PTR_ADD7:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C4]](s64)
8030    ; VI: [[UV6:%[0-9]+]]:_(<2 x s32>), [[UV7:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[EXTRACT1]](<4 x s32>)
8031    ; VI: [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV6]](<2 x s32>)
8032    ; VI: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV8]], [[C]](s32)
8033    ; VI: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV8]](s32)
8034    ; VI: G_STORE [[COPY12]](s32), [[PTR_ADD7]](p1) :: (store 2 + 16, addrspace 1)
8035    ; VI: [[PTR_ADD8:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C1]](s64)
8036    ; VI: [[COPY13:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
8037    ; VI: G_STORE [[COPY13]](s32), [[PTR_ADD8]](p1) :: (store 2 + 18, addrspace 1)
8038    ; VI: [[PTR_ADD9:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C2]](s64)
8039    ; VI: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV9]], [[C]](s32)
8040    ; VI: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV9]](s32)
8041    ; VI: G_STORE [[COPY14]](s32), [[PTR_ADD9]](p1) :: (store 2 + 20, addrspace 1)
8042    ; VI: [[PTR_ADD10:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD9]], [[C1]](s64)
8043    ; VI: [[COPY15:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
8044    ; VI: G_STORE [[COPY15]](s32), [[PTR_ADD10]](p1) :: (store 2 + 22, addrspace 1)
8045    ; VI: [[PTR_ADD11:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD7]], [[C3]](s64)
8046    ; VI: [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV7]](<2 x s32>)
8047    ; VI: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV10]], [[C]](s32)
8048    ; VI: [[COPY16:%[0-9]+]]:_(s32) = COPY [[UV10]](s32)
8049    ; VI: G_STORE [[COPY16]](s32), [[PTR_ADD11]](p1) :: (store 2 + 24, addrspace 1)
8050    ; VI: [[PTR_ADD12:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C1]](s64)
8051    ; VI: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
8052    ; VI: G_STORE [[COPY17]](s32), [[PTR_ADD12]](p1) :: (store 2 + 26, addrspace 1)
8053    ; VI: [[PTR_ADD13:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD11]], [[C2]](s64)
8054    ; VI: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV11]], [[C]](s32)
8055    ; VI: [[COPY18:%[0-9]+]]:_(s32) = COPY [[UV11]](s32)
8056    ; VI: G_STORE [[COPY18]](s32), [[PTR_ADD13]](p1) :: (store 2 + 28, addrspace 1)
8057    ; VI: [[PTR_ADD14:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD13]], [[C1]](s64)
8058    ; VI: [[COPY19:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
8059    ; VI: G_STORE [[COPY19]](s32), [[PTR_ADD14]](p1) :: (store 2 + 30, addrspace 1)
8060    ; VI: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8061    ; VI: [[PTR_ADD15:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C5]](s64)
8062    ; VI: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[EXTRACT2]], [[C]](s32)
8063    ; VI: [[COPY20:%[0-9]+]]:_(s32) = COPY [[EXTRACT2]](s32)
8064    ; VI: G_STORE [[COPY20]](s32), [[PTR_ADD15]](p1) :: (store 2 + 32, addrspace 1)
8065    ; VI: [[PTR_ADD16:%[0-9]+]]:_(p1) = G_PTR_ADD [[PTR_ADD15]], [[C1]](s64)
8066    ; VI: [[COPY21:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
8067    ; VI: G_STORE [[COPY21]](s32), [[PTR_ADD16]](p1) :: (store 2 + 34, addrspace 1)
8068    ; GFX9-LABEL: name: test_store_global_v9s32_align2
8069    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8070    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8071    ; GFX9: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8072    ; GFX9: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8073    ; GFX9: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8074    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8075    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8076    ; GFX9: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8077    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 2, addrspace 1)
8078    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8079    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8080    ; GFX9: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 2, addrspace 1)
8081    ; GFX9: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8082    ; GFX9: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8083    ; GFX9: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 2, addrspace 1)
8084    %0:_(p1) = COPY $vgpr0_vgpr1
8085    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8086    %2:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8087    %3:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8088    %4:_(<9 x s32>) = G_CONCAT_VECTORS %1, %2, %3
8089    G_STORE %4, %0 :: (store 36, align 2, addrspace 1)
8090...
8091
8092---
8093name: test_store_global_v9s32_align4
8094body: |
8095  bb.0:
8096    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10
8097
8098    ; SI-LABEL: name: test_store_global_v9s32_align4
8099    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8100    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8101    ; SI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8102    ; SI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8103    ; SI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8104    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8105    ; SI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8106    ; SI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8107    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
8108    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8109    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8110    ; SI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
8111    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8112    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8113    ; SI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, addrspace 1)
8114    ; CI-LABEL: name: test_store_global_v9s32_align4
8115    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8116    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8117    ; CI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8118    ; CI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8119    ; CI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8120    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8121    ; CI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8122    ; CI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8123    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
8124    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8125    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8126    ; CI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
8127    ; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8128    ; CI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8129    ; CI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, addrspace 1)
8130    ; VI-LABEL: name: test_store_global_v9s32_align4
8131    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8132    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8133    ; VI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8134    ; VI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8135    ; VI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8136    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8137    ; VI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8138    ; VI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8139    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
8140    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8141    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8142    ; VI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
8143    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8144    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8145    ; VI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, addrspace 1)
8146    ; GFX9-LABEL: name: test_store_global_v9s32_align4
8147    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8148    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8149    ; GFX9: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8150    ; GFX9: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8151    ; GFX9: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8152    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8153    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8154    ; GFX9: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8155    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 4, addrspace 1)
8156    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8157    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8158    ; GFX9: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 4, addrspace 1)
8159    ; GFX9: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8160    ; GFX9: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8161    ; GFX9: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, addrspace 1)
8162    %0:_(p1) = COPY $vgpr0_vgpr1
8163    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8164    %2:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8165    %3:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8166    %4:_(<9 x s32>) = G_CONCAT_VECTORS %1, %2, %3
8167    G_STORE %4, %0 :: (store 36, align 4, addrspace 1)
8168...
8169
8170---
8171name: test_store_global_v9s32_align8
8172body: |
8173  bb.0:
8174    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10
8175
8176    ; SI-LABEL: name: test_store_global_v9s32_align8
8177    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8178    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8179    ; SI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8180    ; SI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8181    ; SI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8182    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8183    ; SI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8184    ; SI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8185    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
8186    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8187    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8188    ; SI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
8189    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8190    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8191    ; SI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 8, addrspace 1)
8192    ; CI-LABEL: name: test_store_global_v9s32_align8
8193    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8194    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8195    ; CI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8196    ; CI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8197    ; CI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8198    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8199    ; CI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8200    ; CI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8201    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
8202    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8203    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8204    ; CI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
8205    ; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8206    ; CI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8207    ; CI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 8, addrspace 1)
8208    ; VI-LABEL: name: test_store_global_v9s32_align8
8209    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8210    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8211    ; VI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8212    ; VI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8213    ; VI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8214    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8215    ; VI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8216    ; VI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8217    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
8218    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8219    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8220    ; VI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
8221    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8222    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8223    ; VI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 8, addrspace 1)
8224    ; GFX9-LABEL: name: test_store_global_v9s32_align8
8225    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8226    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8227    ; GFX9: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8228    ; GFX9: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8229    ; GFX9: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8230    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8231    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8232    ; GFX9: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8233    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, align 8, addrspace 1)
8234    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8235    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8236    ; GFX9: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, align 8, addrspace 1)
8237    ; GFX9: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8238    ; GFX9: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8239    ; GFX9: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 8, addrspace 1)
8240    %0:_(p1) = COPY $vgpr0_vgpr1
8241    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8242    %2:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8243    %3:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8244    %4:_(<9 x s32>) = G_CONCAT_VECTORS %1, %2, %3
8245    G_STORE %4, %0 :: (store 36, align 8, addrspace 1)
8246...
8247
8248---
8249name: test_store_global_v9s32_align16
8250body: |
8251  bb.0:
8252    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10
8253
8254    ; SI-LABEL: name: test_store_global_v9s32_align16
8255    ; SI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8256    ; SI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8257    ; SI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8258    ; SI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8259    ; SI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8260    ; SI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8261    ; SI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8262    ; SI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8263    ; SI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
8264    ; SI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8265    ; SI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8266    ; SI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
8267    ; SI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8268    ; SI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8269    ; SI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 16, addrspace 1)
8270    ; CI-LABEL: name: test_store_global_v9s32_align16
8271    ; CI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8272    ; CI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8273    ; CI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8274    ; CI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8275    ; CI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8276    ; CI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8277    ; CI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8278    ; CI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8279    ; CI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
8280    ; CI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8281    ; CI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8282    ; CI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
8283    ; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8284    ; CI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8285    ; CI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 16, addrspace 1)
8286    ; VI-LABEL: name: test_store_global_v9s32_align16
8287    ; VI: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8288    ; VI: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8289    ; VI: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8290    ; VI: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8291    ; VI: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8292    ; VI: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8293    ; VI: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8294    ; VI: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8295    ; VI: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
8296    ; VI: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8297    ; VI: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8298    ; VI: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
8299    ; VI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8300    ; VI: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8301    ; VI: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 16, addrspace 1)
8302    ; GFX9-LABEL: name: test_store_global_v9s32_align16
8303    ; GFX9: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
8304    ; GFX9: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8305    ; GFX9: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8306    ; GFX9: [[COPY3:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8307    ; GFX9: [[CONCAT_VECTORS:%[0-9]+]]:_(<9 x s32>) = G_CONCAT_VECTORS [[COPY1]](<3 x s32>), [[COPY2]](<3 x s32>), [[COPY3]](<3 x s32>)
8308    ; GFX9: [[EXTRACT:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 0
8309    ; GFX9: [[EXTRACT1:%[0-9]+]]:_(<4 x s32>) = G_EXTRACT [[CONCAT_VECTORS]](<9 x s32>), 128
8310    ; GFX9: [[EXTRACT2:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](<3 x s32>), 64
8311    ; GFX9: G_STORE [[EXTRACT]](<4 x s32>), [[COPY]](p1) :: (store 16, addrspace 1)
8312    ; GFX9: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
8313    ; GFX9: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
8314    ; GFX9: G_STORE [[EXTRACT1]](<4 x s32>), [[PTR_ADD]](p1) :: (store 16 + 16, addrspace 1)
8315    ; GFX9: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
8316    ; GFX9: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
8317    ; GFX9: G_STORE [[EXTRACT2]](s32), [[PTR_ADD1]](p1) :: (store 4 + 32, align 16, addrspace 1)
8318    %0:_(p1) = COPY $vgpr0_vgpr1
8319    %1:_(<3 x s32>) = COPY $vgpr2_vgpr3_vgpr4
8320    %2:_(<3 x s32>) = COPY $vgpr5_vgpr6_vgpr7
8321    %3:_(<3 x s32>) = COPY $vgpr7_vgpr8_vgpr9
8322    %4:_(<9 x s32>) = G_CONCAT_VECTORS %1, %2, %3
8323    G_STORE %4, %0 :: (store 36, align 16, addrspace 1)
8324...
8325