1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -amdgpu-global-isel-new-legality -mtriple=amdgcn-amd-amdhsa -mcpu=hawaii -run-pass=amdgpu-regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
3 # RUN: llc -amdgpu-global-isel-new-legality -mtriple=amdgcn-amd-amdhsa -mcpu=hawaii -run-pass=amdgpu-regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
6 define amdgpu_kernel void @load_global_v8i32_non_uniform(ptr addrspace(1) %in) {
7 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
8 %global.not.uniform.v8i32 = getelementptr <8 x i32>, ptr addrspace(1) %in, i32 %tmp0
9 %tmp2 = load <8 x i32>, ptr addrspace(1) %global.not.uniform.v8i32
13 define amdgpu_kernel void @load_global_v4i64_non_uniform(ptr addrspace(1) %in) {
14 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
15 %global.not.uniform.v4i64 = getelementptr <4 x i64>, ptr addrspace(1) %in, i32 %tmp0
16 %tmp2 = load <4 x i64>, ptr addrspace(1) %global.not.uniform.v4i64
19 define amdgpu_kernel void @load_global_v16i32_non_uniform(ptr addrspace(1) %in) {
20 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
21 %global.not.uniform.v16i32 = getelementptr <16 x i32>, ptr addrspace(1) %in, i32 %tmp0
22 %tmp2 = load <16 x i32>, ptr addrspace(1) %global.not.uniform.v16i32
25 define amdgpu_kernel void @load_global_v8i64_non_uniform(ptr addrspace(1) %in) {
26 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
27 %global.not.uniform.v8i64 = getelementptr <8 x i64>, ptr addrspace(1) %in, i32 %tmp0
28 %tmp2 = load <8 x i64>, ptr addrspace(1) %global.not.uniform.v8i64
31 define amdgpu_kernel void @load_global_v8i32_uniform() {ret void}
32 define amdgpu_kernel void @load_global_v4i64_uniform() {ret void}
33 define amdgpu_kernel void @load_global_v16i32_uniform() {ret void}
34 define amdgpu_kernel void @load_global_v8i64_uniform() {ret void}
35 define amdgpu_kernel void @load_constant_v8i32_non_uniform(ptr addrspace(4) %in) {
36 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
37 %constant.not.uniform.v8i32 = getelementptr <8 x i32>, ptr addrspace(4) %in, i32 %tmp0
38 %tmp2 = load <8 x i32>, ptr addrspace(4) %constant.not.uniform.v8i32
42 define amdgpu_kernel void @load_constant_i256_non_uniform(ptr addrspace(4) %in) {
43 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
44 %constant.not.uniform = getelementptr i256, ptr addrspace(4) %in, i32 %tmp0
45 %tmp2 = load i256, ptr addrspace(4) %constant.not.uniform
49 define amdgpu_kernel void @load_constant_v16i16_non_uniform(ptr addrspace(4) %in) {
50 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
51 %constant.not.uniform = getelementptr <16 x i16>, ptr addrspace(4) %in, i32 %tmp0
52 %tmp2 = load <16 x i16>, ptr addrspace(4) %constant.not.uniform
56 define amdgpu_kernel void @load_constant_v4i64_non_uniform(ptr addrspace(4) %in) {
57 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
58 %constant.not.uniform.v4i64 = getelementptr <4 x i64>, ptr addrspace(4) %in, i32 %tmp0
59 %tmp2 = load <4 x i64>, ptr addrspace(4) %constant.not.uniform.v4i64
62 define amdgpu_kernel void @load_constant_v16i32_non_uniform(ptr addrspace(4) %in) {
63 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
64 %constant.not.uniform.v16i32 = getelementptr <16 x i32>, ptr addrspace(4) %in, i32 %tmp0
65 %tmp2 = load <16 x i32>, ptr addrspace(4) %constant.not.uniform.v16i32
68 define amdgpu_kernel void @load_constant_v8i64_non_uniform(ptr addrspace(4) %in) {
69 %tmp0 = call i32 @llvm.amdgcn.workitem.id.x() #0
70 %constant.not.uniform.v8i64 = getelementptr <8 x i64>, ptr addrspace(4) %in, i32 %tmp0
71 %tmp2 = load <8 x i64>, ptr addrspace(4) %constant.not.uniform.v8i64
75 define amdgpu_kernel void @load_constant_v8i32_uniform() {ret void}
76 define amdgpu_kernel void @load_constant_v16i16_uniform() {ret void}
77 define amdgpu_kernel void @load_constant_v4i64_uniform() {ret void}
78 define amdgpu_kernel void @load_constant_v16i32_uniform() {ret void}
79 define amdgpu_kernel void @load_constant_v8i64_uniform() {ret void}
80 define amdgpu_kernel void @load_local_uniform() { ret void }
81 define amdgpu_kernel void @load_region_uniform() { ret void }
82 define amdgpu_kernel void @extload_constant_i8_to_i32_uniform() { ret void }
83 define amdgpu_kernel void @extload_global_i8_to_i32_uniform() { ret void }
84 define amdgpu_kernel void @extload_constant_i16_to_i32_uniform() { ret void }
85 define amdgpu_kernel void @extload_global_i16_to_i32_uniform() { ret void }
86 define amdgpu_kernel void @load_constant_i32_uniform_align4() {ret void}
87 define amdgpu_kernel void @load_constant_i32_uniform_align2() {ret void}
88 define amdgpu_kernel void @load_constant_i32_uniform_align1() {ret void}
89 define amdgpu_kernel void @load_private_uniform_sgpr_i32() {ret void}
90 define amdgpu_kernel void @load_constant_v8i32_vgpr_crash() { ret void }
91 define amdgpu_kernel void @load_constant_v8i32_vgpr_crash_loop_phi() { ret void }
93 define amdgpu_kernel void @load_constant_v3i32_align4() { ret void }
94 define amdgpu_kernel void @load_constant_v3i32_align8() { ret void }
95 define amdgpu_kernel void @load_constant_v3i32_align16() { ret void }
97 define amdgpu_kernel void @load_constant_v6i16_align4() { ret void }
98 define amdgpu_kernel void @load_constant_v6i16_align8() { ret void }
99 define amdgpu_kernel void @load_constant_v6i16_align16() { ret void }
101 define amdgpu_kernel void @load_constant_i96_align4() { ret void }
102 define amdgpu_kernel void @load_constant_i96_align8() { ret void }
103 define amdgpu_kernel void @load_constant_i96_align16() { ret void }
105 declare i32 @llvm.amdgcn.workitem.id.x() #0
106 attributes #0 = { nounwind readnone }
110 name: load_global_v8i32_non_uniform
115 liveins: $sgpr0_sgpr1
116 ; CHECK-LABEL: name: load_global_v8i32_non_uniform
117 ; CHECK: liveins: $sgpr0_sgpr1
119 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
120 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p1) = COPY [[COPY]](p1)
121 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[COPY]](p1) :: (load (<4 x s32>) from %ir.global.not.uniform.v8i32, align 32, addrspace 1)
122 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
123 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
124 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD]](p1) :: (load (<4 x s32>) from %ir.global.not.uniform.v8i32 + 16, basealign 32, addrspace 1)
125 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<8 x s32>) = G_CONCAT_VECTORS [[LOAD]](<4 x s32>), [[LOAD1]](<4 x s32>)
126 %0:_(p1) = COPY $sgpr0_sgpr1
127 %1:_(<8 x s32>) = G_LOAD %0 :: (load (<8 x s32>) from %ir.global.not.uniform.v8i32)
131 name: load_global_v4i64_non_uniform
136 liveins: $sgpr0_sgpr1
138 ; CHECK-LABEL: name: load_global_v4i64_non_uniform
139 ; CHECK: liveins: $sgpr0_sgpr1
141 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
142 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p1) = COPY [[COPY]](p1)
143 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[COPY]](p1) :: (load (<2 x s64>) from %ir.global.not.uniform.v4i64, align 32, addrspace 1)
144 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
145 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
146 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[PTR_ADD]](p1) :: (load (<2 x s64>) from %ir.global.not.uniform.v4i64 + 16, basealign 32, addrspace 1)
147 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s64>) = G_CONCAT_VECTORS [[LOAD]](<2 x s64>), [[LOAD1]](<2 x s64>)
148 %0:_(p1) = COPY $sgpr0_sgpr1
149 %1:_(<4 x s64>) = G_LOAD %0 :: (load (<4 x s64>) from %ir.global.not.uniform.v4i64)
153 name: load_global_v16i32_non_uniform
158 liveins: $sgpr0_sgpr1
159 ; CHECK-LABEL: name: load_global_v16i32_non_uniform
160 ; CHECK: liveins: $sgpr0_sgpr1
162 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
163 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p1) = COPY [[COPY]](p1)
164 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[COPY]](p1) :: (load (<4 x s32>) from %ir.global.not.uniform.v16i32, align 64, addrspace 1)
165 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
166 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
167 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD]](p1) :: (load (<4 x s32>) from %ir.global.not.uniform.v16i32 + 16, basealign 64, addrspace 1)
168 ; CHECK-NEXT: [[C1:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 32
169 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
170 ; CHECK-NEXT: [[LOAD2:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD1]](p1) :: (load (<4 x s32>) from %ir.global.not.uniform.v16i32 + 32, align 32, basealign 64, addrspace 1)
171 ; CHECK-NEXT: [[C2:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 48
172 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
173 ; CHECK-NEXT: [[LOAD3:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD2]](p1) :: (load (<4 x s32>) from %ir.global.not.uniform.v16i32 + 48, basealign 64, addrspace 1)
174 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<16 x s32>) = G_CONCAT_VECTORS [[LOAD]](<4 x s32>), [[LOAD1]](<4 x s32>), [[LOAD2]](<4 x s32>), [[LOAD3]](<4 x s32>)
175 %0:_(p1) = COPY $sgpr0_sgpr1
176 %1:_(<16 x s32>) = G_LOAD %0 :: (load (<16 x s32>) from %ir.global.not.uniform.v16i32)
180 name: load_global_v8i64_non_uniform
185 liveins: $sgpr0_sgpr1
186 ; CHECK-LABEL: name: load_global_v8i64_non_uniform
187 ; CHECK: liveins: $sgpr0_sgpr1
189 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
190 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p1) = COPY [[COPY]](p1)
191 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[COPY]](p1) :: (load (<2 x s64>) from %ir.global.not.uniform.v8i64, align 64, addrspace 1)
192 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
193 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
194 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[PTR_ADD]](p1) :: (load (<2 x s64>) from %ir.global.not.uniform.v8i64 + 16, basealign 64, addrspace 1)
195 ; CHECK-NEXT: [[C1:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 32
196 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
197 ; CHECK-NEXT: [[LOAD2:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[PTR_ADD1]](p1) :: (load (<2 x s64>) from %ir.global.not.uniform.v8i64 + 32, align 32, basealign 64, addrspace 1)
198 ; CHECK-NEXT: [[C2:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 48
199 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
200 ; CHECK-NEXT: [[LOAD3:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[PTR_ADD2]](p1) :: (load (<2 x s64>) from %ir.global.not.uniform.v8i64 + 48, basealign 64, addrspace 1)
201 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<8 x s64>) = G_CONCAT_VECTORS [[LOAD]](<2 x s64>), [[LOAD1]](<2 x s64>), [[LOAD2]](<2 x s64>), [[LOAD3]](<2 x s64>)
202 %0:_(p1) = COPY $sgpr0_sgpr1
203 %1:_(<8 x s64>) = G_LOAD %0 :: (load (<8 x s64>) from %ir.global.not.uniform.v8i64)
207 name: load_global_v8i32_uniform
212 liveins: $sgpr0_sgpr1
213 ; CHECK-LABEL: name: load_global_v8i32_uniform
214 ; CHECK: liveins: $sgpr0_sgpr1
216 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
217 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<8 x s32>) = G_LOAD [[COPY]](p1) :: (invariant load (<8 x s32>), addrspace 1)
218 %0:_(p1) = COPY $sgpr0_sgpr1
219 %1:_(<8 x s32>) = G_LOAD %0 :: (invariant load (<8 x s32>), addrspace 1)
223 name: load_global_v4i64_uniform
228 liveins: $sgpr0_sgpr1
229 ; CHECK-LABEL: name: load_global_v4i64_uniform
230 ; CHECK: liveins: $sgpr0_sgpr1
232 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
233 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<4 x s64>) = G_LOAD [[COPY]](p1) :: (invariant load (<4 x s64>), addrspace 1)
234 %0:_(p1) = COPY $sgpr0_sgpr1
235 %1:_(<4 x s64>) = G_LOAD %0 :: (invariant load (<4 x s64>), addrspace 1)
239 name: load_global_v16i32_uniform
244 liveins: $sgpr0_sgpr1
245 ; CHECK-LABEL: name: load_global_v16i32_uniform
246 ; CHECK: liveins: $sgpr0_sgpr1
248 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
249 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<16 x s32>) = G_LOAD [[COPY]](p1) :: (invariant load (<16 x s32>), addrspace 1)
250 %0:_(p1) = COPY $sgpr0_sgpr1
251 %1:_(<16 x s32>) = G_LOAD %0 :: (invariant load (<16 x s32>), addrspace 1)
255 name: load_global_v8i64_uniform
260 liveins: $sgpr0_sgpr1
261 ; CHECK-LABEL: name: load_global_v8i64_uniform
262 ; CHECK: liveins: $sgpr0_sgpr1
264 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
265 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<8 x s64>) = G_LOAD [[COPY]](p1) :: (invariant load (<8 x s64>), addrspace 1)
266 %0:_(p1) = COPY $sgpr0_sgpr1
267 %1:_(<8 x s64>) = G_LOAD %0 :: (invariant load (<8 x s64>), addrspace 1)
271 name: load_constant_v8i32_non_uniform
276 liveins: $sgpr0_sgpr1
277 ; CHECK-LABEL: name: load_constant_v8i32_non_uniform
278 ; CHECK: liveins: $sgpr0_sgpr1
280 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
281 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
282 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[COPY]](p4) :: (load (<4 x s32>) from %ir.constant.not.uniform.v8i32, align 32, addrspace 4)
283 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
284 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
285 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD]](p4) :: (load (<4 x s32>) from %ir.constant.not.uniform.v8i32 + 16, basealign 32, addrspace 4)
286 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<8 x s32>) = G_CONCAT_VECTORS [[LOAD]](<4 x s32>), [[LOAD1]](<4 x s32>)
287 %0:_(p4) = COPY $sgpr0_sgpr1
288 %1:_(<8 x s32>) = G_LOAD %0 :: (load (<8 x s32>) from %ir.constant.not.uniform.v8i32)
292 name: load_constant_i256_non_uniform
297 liveins: $sgpr0_sgpr1
298 ; CHECK-LABEL: name: load_constant_i256_non_uniform
299 ; CHECK: liveins: $sgpr0_sgpr1
301 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
302 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
303 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s128) = G_LOAD [[COPY]](p4) :: (load (s128) from %ir.constant.not.uniform, align 32, addrspace 4)
304 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
305 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
306 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(s128) = G_LOAD [[PTR_ADD]](p4) :: (load (s128) from %ir.constant.not.uniform + 16, basealign 32, addrspace 4)
307 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s256) = G_MERGE_VALUES [[LOAD]](s128), [[LOAD1]](s128)
308 %0:_(p4) = COPY $sgpr0_sgpr1
309 %1:_(s256) = G_LOAD %0 :: (load (s256) from %ir.constant.not.uniform)
313 name: load_constant_v16i16_non_uniform
318 liveins: $sgpr0_sgpr1
320 ; CHECK-LABEL: name: load_constant_v16i16_non_uniform
321 ; CHECK: liveins: $sgpr0_sgpr1
323 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
324 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
325 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<8 x s16>) = G_LOAD [[COPY]](p4) :: (load (<8 x s16>) from %ir.constant.not.uniform, align 32, addrspace 4)
326 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
327 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
328 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<8 x s16>) = G_LOAD [[PTR_ADD]](p4) :: (load (<8 x s16>) from %ir.constant.not.uniform + 16, basealign 32, addrspace 4)
329 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<16 x s16>) = G_CONCAT_VECTORS [[LOAD]](<8 x s16>), [[LOAD1]](<8 x s16>)
330 %0:_(p4) = COPY $sgpr0_sgpr1
331 %1:_(<16 x s16>) = G_LOAD %0 :: (load (<16 x s16>) from %ir.constant.not.uniform)
335 name: load_constant_v4i64_non_uniform
340 liveins: $sgpr0_sgpr1
341 ; CHECK-LABEL: name: load_constant_v4i64_non_uniform
342 ; CHECK: liveins: $sgpr0_sgpr1
344 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
345 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
346 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[COPY]](p4) :: (load (<2 x s64>) from %ir.constant.not.uniform.v4i64, align 32, addrspace 4)
347 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
348 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
349 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[PTR_ADD]](p4) :: (load (<2 x s64>) from %ir.constant.not.uniform.v4i64 + 16, basealign 32, addrspace 4)
350 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s64>) = G_CONCAT_VECTORS [[LOAD]](<2 x s64>), [[LOAD1]](<2 x s64>)
351 %0:_(p4) = COPY $sgpr0_sgpr1
352 %1:_(<4 x s64>) = G_LOAD %0 :: (load (<4 x s64>) from %ir.constant.not.uniform.v4i64)
356 name: load_constant_v16i32_non_uniform
361 liveins: $sgpr0_sgpr1
362 ; CHECK-LABEL: name: load_constant_v16i32_non_uniform
363 ; CHECK: liveins: $sgpr0_sgpr1
365 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
366 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
367 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[COPY]](p4) :: (load (<4 x s32>) from %ir.constant.not.uniform.v16i32, align 64, addrspace 4)
368 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
369 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
370 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD]](p4) :: (load (<4 x s32>) from %ir.constant.not.uniform.v16i32 + 16, basealign 64, addrspace 4)
371 ; CHECK-NEXT: [[C1:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 32
372 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C1]](s64)
373 ; CHECK-NEXT: [[LOAD2:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD1]](p4) :: (load (<4 x s32>) from %ir.constant.not.uniform.v16i32 + 32, align 32, basealign 64, addrspace 4)
374 ; CHECK-NEXT: [[C2:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 48
375 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C2]](s64)
376 ; CHECK-NEXT: [[LOAD3:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD2]](p4) :: (load (<4 x s32>) from %ir.constant.not.uniform.v16i32 + 48, basealign 64, addrspace 4)
377 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<16 x s32>) = G_CONCAT_VECTORS [[LOAD]](<4 x s32>), [[LOAD1]](<4 x s32>), [[LOAD2]](<4 x s32>), [[LOAD3]](<4 x s32>)
378 %0:_(p4) = COPY $sgpr0_sgpr1
379 %1:_(<16 x s32>) = G_LOAD %0 :: (load (<16 x s32>) from %ir.constant.not.uniform.v16i32)
383 name: load_constant_v8i64_non_uniform
388 liveins: $sgpr0_sgpr1
389 ; CHECK-LABEL: name: load_constant_v8i64_non_uniform
390 ; CHECK: liveins: $sgpr0_sgpr1
392 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
393 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
394 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[COPY]](p4) :: (load (<2 x s64>) from %ir.constant.not.uniform.v8i64, align 64, addrspace 4)
395 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
396 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
397 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[PTR_ADD]](p4) :: (load (<2 x s64>) from %ir.constant.not.uniform.v8i64 + 16, basealign 64, addrspace 4)
398 ; CHECK-NEXT: [[C1:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 32
399 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C1]](s64)
400 ; CHECK-NEXT: [[LOAD2:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[PTR_ADD1]](p4) :: (load (<2 x s64>) from %ir.constant.not.uniform.v8i64 + 32, align 32, basealign 64, addrspace 4)
401 ; CHECK-NEXT: [[C2:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 48
402 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C2]](s64)
403 ; CHECK-NEXT: [[LOAD3:%[0-9]+]]:vgpr(<2 x s64>) = G_LOAD [[PTR_ADD2]](p4) :: (load (<2 x s64>) from %ir.constant.not.uniform.v8i64 + 48, basealign 64, addrspace 4)
404 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<8 x s64>) = G_CONCAT_VECTORS [[LOAD]](<2 x s64>), [[LOAD1]](<2 x s64>), [[LOAD2]](<2 x s64>), [[LOAD3]](<2 x s64>)
405 %0:_(p4) = COPY $sgpr0_sgpr1
406 %1:_(<8 x s64>) = G_LOAD %0 :: (load (<8 x s64>) from %ir.constant.not.uniform.v8i64)
410 name: load_constant_v8i32_uniform
415 liveins: $sgpr0_sgpr1
416 ; CHECK-LABEL: name: load_constant_v8i32_uniform
417 ; CHECK: liveins: $sgpr0_sgpr1
419 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
420 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<8 x s32>) = G_LOAD [[COPY]](p4) :: (load (<8 x s32>), addrspace 4)
421 %0:_(p4) = COPY $sgpr0_sgpr1
422 %1:_(<8 x s32>) = G_LOAD %0 :: (load (<8 x s32>), addrspace 4)
426 name: load_constant_v16i16_uniform
431 liveins: $sgpr0_sgpr1
432 ; CHECK-LABEL: name: load_constant_v16i16_uniform
433 ; CHECK: liveins: $sgpr0_sgpr1
435 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
436 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<16 x s16>) = G_LOAD [[COPY]](p4) :: (load (<16 x s16>), addrspace 4)
437 %0:_(p4) = COPY $sgpr0_sgpr1
438 %1:_(<16 x s16>) = G_LOAD %0 :: (load (<16 x s16>), addrspace 4)
442 name: load_constant_v4i64_uniform
447 liveins: $sgpr0_sgpr1
448 ; CHECK-LABEL: name: load_constant_v4i64_uniform
449 ; CHECK: liveins: $sgpr0_sgpr1
451 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
452 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<4 x s64>) = G_LOAD [[COPY]](p4) :: (load (<4 x s64>), addrspace 4)
453 %0:_(p4) = COPY $sgpr0_sgpr1
454 %1:_(<4 x s64>) = G_LOAD %0 :: (load (<4 x s64>), addrspace 4)
458 name: load_constant_v16i32_uniform
463 liveins: $sgpr0_sgpr1
464 ; CHECK-LABEL: name: load_constant_v16i32_uniform
465 ; CHECK: liveins: $sgpr0_sgpr1
467 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
468 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<16 x s32>) = G_LOAD [[COPY]](p4) :: (load (<16 x s32>), addrspace 4)
469 %0:_(p4) = COPY $sgpr0_sgpr1
470 %1:_(<16 x s32>) = G_LOAD %0 :: (load (<16 x s32>), addrspace 4)
474 name: load_constant_v8i64_uniform
479 liveins: $sgpr0_sgpr1
480 ; CHECK-LABEL: name: load_constant_v8i64_uniform
481 ; CHECK: liveins: $sgpr0_sgpr1
483 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
484 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<8 x s64>) = G_LOAD [[COPY]](p4) :: (load (<8 x s64>), addrspace 4)
485 %0:_(p4) = COPY $sgpr0_sgpr1
486 %1:_(<8 x s64>) = G_LOAD %0 :: (load (<8 x s64>), addrspace 4)
490 name: load_local_uniform
496 ; CHECK-LABEL: name: load_local_uniform
497 ; CHECK: liveins: $sgpr0
499 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p3) = COPY $sgpr0
500 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p3) = COPY [[COPY]](p3)
501 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s32) = G_LOAD [[COPY1]](p3) :: (load (s32), addrspace 3)
502 %0:_(p3) = COPY $sgpr0
503 %1:_(s32) = G_LOAD %0 :: (load (s32), addrspace 3)
507 name: load_region_uniform
513 ; CHECK-LABEL: name: load_region_uniform
514 ; CHECK: liveins: $sgpr0
516 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p3) = COPY $sgpr0
517 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p3) = COPY [[COPY]](p3)
518 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s32) = G_LOAD [[COPY1]](p3) :: (load (s32), addrspace 5)
519 %0:_(p3) = COPY $sgpr0
520 %1:_(s32) = G_LOAD %0 :: (load (s32), addrspace 5)
525 name: extload_constant_i8_to_i32_uniform
530 liveins: $sgpr0_sgpr1
531 ; CHECK-LABEL: name: extload_constant_i8_to_i32_uniform
532 ; CHECK: liveins: $sgpr0_sgpr1
534 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
535 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
536 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s32) = G_LOAD [[COPY1]](p4) :: (load (s8), addrspace 4)
537 %0:_(p4) = COPY $sgpr0_sgpr1
538 %1:_(s32) = G_LOAD %0 :: (load (s8), addrspace 4, align 1)
542 name: extload_global_i8_to_i32_uniform
547 liveins: $sgpr0_sgpr1
549 ; CHECK-LABEL: name: extload_global_i8_to_i32_uniform
550 ; CHECK: liveins: $sgpr0_sgpr1
552 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
553 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
554 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s32) = G_LOAD [[COPY1]](p4) :: (load (s8), addrspace 1)
555 %0:_(p4) = COPY $sgpr0_sgpr1
556 %1:_(s32) = G_LOAD %0 :: (load (s8), addrspace 1, align 1)
560 name: extload_constant_i16_to_i32_uniform
565 liveins: $sgpr0_sgpr1
567 ; CHECK-LABEL: name: extload_constant_i16_to_i32_uniform
568 ; CHECK: liveins: $sgpr0_sgpr1
570 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
571 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
572 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s32) = G_LOAD [[COPY1]](p4) :: (load (s16), addrspace 4)
573 %0:_(p4) = COPY $sgpr0_sgpr1
574 %1:_(s32) = G_LOAD %0 :: (load (s16), addrspace 4, align 2)
578 name: extload_global_i16_to_i32_uniform
583 liveins: $sgpr0_sgpr1
585 ; CHECK-LABEL: name: extload_global_i16_to_i32_uniform
586 ; CHECK: liveins: $sgpr0_sgpr1
588 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
589 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
590 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s32) = G_LOAD [[COPY1]](p4) :: (load (s16), addrspace 1)
591 %0:_(p4) = COPY $sgpr0_sgpr1
592 %1:_(s32) = G_LOAD %0 :: (load (s16), addrspace 1, align 2)
596 name: load_constant_i32_uniform_align4
601 liveins: $sgpr0_sgpr1
602 ; CHECK-LABEL: name: load_constant_i32_uniform_align4
603 ; CHECK: liveins: $sgpr0_sgpr1
605 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
606 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(s32) = G_LOAD [[COPY]](p4) :: (load (s32), addrspace 4)
607 %0:_(p4) = COPY $sgpr0_sgpr1
608 %1:_(s32) = G_LOAD %0 :: (load (s32), addrspace 4, align 4)
612 name: load_constant_i32_uniform_align2
617 liveins: $sgpr0_sgpr1
619 ; CHECK-LABEL: name: load_constant_i32_uniform_align2
620 ; CHECK: liveins: $sgpr0_sgpr1
622 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
623 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
624 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s32) = G_LOAD [[COPY1]](p4) :: (load (s32), align 2, addrspace 4)
625 %0:_(p4) = COPY $sgpr0_sgpr1
626 %1:_(s32) = G_LOAD %0 :: (load (s32), addrspace 4, align 2)
630 name: load_constant_i32_uniform_align1
635 liveins: $sgpr0_sgpr1
637 ; CHECK-LABEL: name: load_constant_i32_uniform_align1
638 ; CHECK: liveins: $sgpr0_sgpr1
640 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
641 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p4) = COPY [[COPY]](p4)
642 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s32) = G_LOAD [[COPY1]](p4) :: (load (s32), align 1, addrspace 4)
643 %0:_(p4) = COPY $sgpr0_sgpr1
644 %1:_(s32) = G_LOAD %0 :: (load (s32), addrspace 4, align 1)
648 name: load_private_uniform_sgpr_i32
655 ; CHECK-LABEL: name: load_private_uniform_sgpr_i32
656 ; CHECK: liveins: $sgpr0
658 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p5) = COPY $sgpr0
659 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(p5) = COPY [[COPY]](p5)
660 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(s32) = G_LOAD [[COPY1]](p5) :: (load (s32), addrspace 5)
661 %0:_(p5) = COPY $sgpr0
662 %1:_(s32) = G_LOAD %0 :: (load (s32), addrspace 5, align 4)
666 name: load_constant_v8i32_vgpr_crash
668 tracksRegLiveness: true
672 liveins: $vgpr0_vgpr1
674 ; CHECK-LABEL: name: load_constant_v8i32_vgpr_crash
675 ; CHECK: liveins: $vgpr0_vgpr1
677 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(p4) = COPY $vgpr0_vgpr1
678 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[COPY]](p4) :: (load (<4 x s32>), align 32, addrspace 4)
679 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
680 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
681 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD]](p4) :: (load (<4 x s32>) from unknown-address + 16, addrspace 4)
682 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<8 x s32>) = G_CONCAT_VECTORS [[LOAD]](<4 x s32>), [[LOAD1]](<4 x s32>)
683 %0:_(p4) = COPY $vgpr0_vgpr1
684 %1:_(<8 x s32>) = G_LOAD %0 :: (load (<8 x s32>), addrspace 4)
688 name: load_constant_v8i32_vgpr_crash_loop_phi
690 tracksRegLiveness: true
693 ; CHECK-LABEL: name: load_constant_v8i32_vgpr_crash_loop_phi
695 ; CHECK-NEXT: successors: %bb.1(0x80000000)
696 ; CHECK-NEXT: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
698 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
699 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(p4) = COPY $sgpr2_sgpr3
700 ; CHECK-NEXT: G_BR %bb.1
703 ; CHECK-NEXT: successors: %bb.1(0x80000000)
705 ; CHECK-NEXT: [[PHI:%[0-9]+]]:vgpr(p4) = G_PHI [[COPY]](p4), %bb.0, %3(p4), %bb.1
706 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PHI]](p4) :: (load (<4 x s32>), align 32, addrspace 4)
707 ; CHECK-NEXT: [[C:%[0-9]+]]:vgpr(s64) = G_CONSTANT i64 16
708 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:vgpr(p4) = G_PTR_ADD [[PHI]], [[C]](s64)
709 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:vgpr(<4 x s32>) = G_LOAD [[PTR_ADD]](p4) :: (load (<4 x s32>) from unknown-address + 16, addrspace 4)
710 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<8 x s32>) = G_CONCAT_VECTORS [[LOAD]](<4 x s32>), [[LOAD1]](<4 x s32>)
711 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:sgpr(p4) = COPY [[COPY1]](p4)
712 ; CHECK-NEXT: G_BR %bb.1
714 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
717 %0:_(p4) = COPY $sgpr0_sgpr1
718 %1:_(p4) = COPY $sgpr2_sgpr3
722 %2:_(p4) = G_PHI %0, %bb.0, %4, %bb.1
723 %3:_(<8 x s32>) = G_LOAD %2 :: (load (<8 x s32>), addrspace 4)
729 name: load_constant_v3i32_align4
734 liveins: $sgpr0_sgpr1
735 ; CHECK-LABEL: name: load_constant_v3i32_align4
736 ; CHECK: liveins: $sgpr0_sgpr1
738 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
739 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<2 x s32>) = G_LOAD [[COPY]](p4) :: (invariant load (<2 x s32>), align 4, addrspace 4)
740 ; CHECK-NEXT: [[C:%[0-9]+]]:sgpr(s64) = G_CONSTANT i64 8
741 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:sgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
742 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:sgpr(s32) = G_LOAD [[PTR_ADD]](p4) :: (invariant load (s32) from unknown-address + 8, addrspace 4)
743 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[LOAD]](<2 x s32>)
744 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:sgpr(<3 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32), [[LOAD1]](s32)
745 ; CHECK-NEXT: S_ENDPGM 0, implicit [[BUILD_VECTOR]](<3 x s32>)
746 %0:_(p4) = COPY $sgpr0_sgpr1
747 %1:_(<3 x s32>) = G_LOAD %0 :: (invariant load (<3 x s32>), addrspace 4, align 4)
748 S_ENDPGM 0, implicit %1
752 name: load_constant_v3i32_align8
757 liveins: $sgpr0_sgpr1
758 ; CHECK-LABEL: name: load_constant_v3i32_align8
759 ; CHECK: liveins: $sgpr0_sgpr1
761 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
762 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<2 x s32>) = G_LOAD [[COPY]](p4) :: (invariant load (<2 x s32>), addrspace 4)
763 ; CHECK-NEXT: [[C:%[0-9]+]]:sgpr(s64) = G_CONSTANT i64 8
764 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:sgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
765 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:sgpr(s32) = G_LOAD [[PTR_ADD]](p4) :: (invariant load (s32) from unknown-address + 8, align 8, addrspace 4)
766 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[LOAD]](<2 x s32>)
767 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:sgpr(<3 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32), [[LOAD1]](s32)
768 ; CHECK-NEXT: S_ENDPGM 0, implicit [[BUILD_VECTOR]](<3 x s32>)
769 %0:_(p4) = COPY $sgpr0_sgpr1
770 %1:_(<3 x s32>) = G_LOAD %0 :: (invariant load (<3 x s32>), addrspace 4, align 8)
771 S_ENDPGM 0, implicit %1
775 name: load_constant_v3i32_align16
780 liveins: $sgpr0_sgpr1
781 ; CHECK-LABEL: name: load_constant_v3i32_align16
782 ; CHECK: liveins: $sgpr0_sgpr1
784 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
785 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<4 x s32>) = G_LOAD [[COPY]](p4) :: (invariant load (<4 x s32>), addrspace 4)
786 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32), [[UV2:%[0-9]+]]:sgpr(s32), [[UV3:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[LOAD]](<4 x s32>)
787 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:sgpr(<3 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32), [[UV2]](s32)
788 ; CHECK-NEXT: S_ENDPGM 0, implicit [[BUILD_VECTOR]](<3 x s32>)
789 %0:_(p4) = COPY $sgpr0_sgpr1
790 %1:_(<3 x s32>) = G_LOAD %0 :: (invariant load (<3 x s32>), addrspace 4, align 16)
791 S_ENDPGM 0, implicit %1
795 name: load_constant_v6i16_align4
800 liveins: $sgpr0_sgpr1
801 ; CHECK-LABEL: name: load_constant_v6i16_align4
802 ; CHECK: liveins: $sgpr0_sgpr1
804 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
805 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<4 x s16>) = G_LOAD [[COPY]](p4) :: (invariant load (<4 x s16>), align 4, addrspace 4)
806 ; CHECK-NEXT: [[C:%[0-9]+]]:sgpr(s64) = G_CONSTANT i64 8
807 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:sgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
808 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:sgpr(<2 x s16>) = G_LOAD [[PTR_ADD]](p4) :: (invariant load (<2 x s16>) from unknown-address + 8, addrspace 4)
809 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s16), [[UV1:%[0-9]+]]:sgpr(s16), [[UV2:%[0-9]+]]:sgpr(s16), [[UV3:%[0-9]+]]:sgpr(s16) = G_UNMERGE_VALUES [[LOAD]](<4 x s16>)
810 ; CHECK-NEXT: [[UV4:%[0-9]+]]:sgpr(s16), [[UV5:%[0-9]+]]:sgpr(s16) = G_UNMERGE_VALUES [[LOAD1]](<2 x s16>)
811 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:sgpr(<6 x s16>) = G_BUILD_VECTOR [[UV]](s16), [[UV1]](s16), [[UV2]](s16), [[UV3]](s16), [[UV4]](s16), [[UV5]](s16)
812 ; CHECK-NEXT: S_ENDPGM 0, implicit [[BUILD_VECTOR]](<6 x s16>)
813 %0:_(p4) = COPY $sgpr0_sgpr1
814 %1:_(<6 x s16>) = G_LOAD %0 :: (invariant load (<6 x s16>), addrspace 4, align 4)
815 S_ENDPGM 0, implicit %1
819 name: load_constant_v6i16_align8
824 liveins: $sgpr0_sgpr1
825 ; CHECK-LABEL: name: load_constant_v6i16_align8
826 ; CHECK: liveins: $sgpr0_sgpr1
828 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
829 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<4 x s16>) = G_LOAD [[COPY]](p4) :: (invariant load (<4 x s16>), addrspace 4)
830 ; CHECK-NEXT: [[C:%[0-9]+]]:sgpr(s64) = G_CONSTANT i64 8
831 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:sgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
832 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:sgpr(<2 x s16>) = G_LOAD [[PTR_ADD]](p4) :: (invariant load (<2 x s16>) from unknown-address + 8, align 8, addrspace 4)
833 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s16), [[UV1:%[0-9]+]]:sgpr(s16), [[UV2:%[0-9]+]]:sgpr(s16), [[UV3:%[0-9]+]]:sgpr(s16) = G_UNMERGE_VALUES [[LOAD]](<4 x s16>)
834 ; CHECK-NEXT: [[UV4:%[0-9]+]]:sgpr(s16), [[UV5:%[0-9]+]]:sgpr(s16) = G_UNMERGE_VALUES [[LOAD1]](<2 x s16>)
835 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:sgpr(<6 x s16>) = G_BUILD_VECTOR [[UV]](s16), [[UV1]](s16), [[UV2]](s16), [[UV3]](s16), [[UV4]](s16), [[UV5]](s16)
836 ; CHECK-NEXT: S_ENDPGM 0, implicit [[BUILD_VECTOR]](<6 x s16>)
837 %0:_(p4) = COPY $sgpr0_sgpr1
838 %1:_(<6 x s16>) = G_LOAD %0 :: (invariant load (<6 x s16>), addrspace 4, align 8)
839 S_ENDPGM 0, implicit %1
843 name: load_constant_v6i16_align16
848 liveins: $sgpr0_sgpr1
849 ; CHECK-LABEL: name: load_constant_v6i16_align16
850 ; CHECK: liveins: $sgpr0_sgpr1
852 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
853 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(<8 x s16>) = G_LOAD [[COPY]](p4) :: (invariant load (<8 x s16>), addrspace 4)
854 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s16), [[UV1:%[0-9]+]]:sgpr(s16), [[UV2:%[0-9]+]]:sgpr(s16), [[UV3:%[0-9]+]]:sgpr(s16), [[UV4:%[0-9]+]]:sgpr(s16), [[UV5:%[0-9]+]]:sgpr(s16), [[UV6:%[0-9]+]]:sgpr(s16), [[UV7:%[0-9]+]]:sgpr(s16) = G_UNMERGE_VALUES [[LOAD]](<8 x s16>)
855 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:sgpr(<6 x s16>) = G_BUILD_VECTOR [[UV]](s16), [[UV1]](s16), [[UV2]](s16), [[UV3]](s16), [[UV4]](s16), [[UV5]](s16)
856 ; CHECK-NEXT: S_ENDPGM 0, implicit [[BUILD_VECTOR]](<6 x s16>)
857 %0:_(p4) = COPY $sgpr0_sgpr1
858 %1:_(<6 x s16>) = G_LOAD %0 :: (invariant load (<6 x s16>), addrspace 4, align 16)
859 S_ENDPGM 0, implicit %1
863 name: load_constant_i96_align4
868 liveins: $sgpr0_sgpr1
869 ; CHECK-LABEL: name: load_constant_i96_align4
870 ; CHECK: liveins: $sgpr0_sgpr1
872 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
873 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(s64) = G_LOAD [[COPY]](p4) :: (invariant load (s64), align 4, addrspace 4)
874 ; CHECK-NEXT: [[C:%[0-9]+]]:sgpr(s64) = G_CONSTANT i64 8
875 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:sgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
876 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:sgpr(s32) = G_LOAD [[PTR_ADD]](p4) :: (invariant load (s32) from unknown-address + 8, addrspace 4)
877 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[LOAD]](s64)
878 ; CHECK-NEXT: [[MV:%[0-9]+]]:sgpr(s96) = G_MERGE_VALUES [[UV]](s32), [[UV1]](s32), [[LOAD1]](s32)
879 ; CHECK-NEXT: S_ENDPGM 0, implicit [[MV]](s96)
880 %0:_(p4) = COPY $sgpr0_sgpr1
881 %1:_(s96) = G_LOAD %0 :: (invariant load (s96), addrspace 4, align 4)
882 S_ENDPGM 0, implicit %1
886 name: load_constant_i96_align8
891 liveins: $sgpr0_sgpr1
892 ; CHECK-LABEL: name: load_constant_i96_align8
893 ; CHECK: liveins: $sgpr0_sgpr1
895 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
896 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(s64) = G_LOAD [[COPY]](p4) :: (invariant load (s64), addrspace 4)
897 ; CHECK-NEXT: [[C:%[0-9]+]]:sgpr(s64) = G_CONSTANT i64 8
898 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:sgpr(p4) = G_PTR_ADD [[COPY]], [[C]](s64)
899 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:sgpr(s32) = G_LOAD [[PTR_ADD]](p4) :: (invariant load (s32) from unknown-address + 8, align 8, addrspace 4)
900 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[LOAD]](s64)
901 ; CHECK-NEXT: [[MV:%[0-9]+]]:sgpr(s96) = G_MERGE_VALUES [[UV]](s32), [[UV1]](s32), [[LOAD1]](s32)
902 ; CHECK-NEXT: S_ENDPGM 0, implicit [[MV]](s96)
903 %0:_(p4) = COPY $sgpr0_sgpr1
904 %1:_(s96) = G_LOAD %0 :: (invariant load (s96), addrspace 4, align 8)
905 S_ENDPGM 0, implicit %1
909 name: load_constant_i96_align16
914 liveins: $sgpr0_sgpr1
915 ; CHECK-LABEL: name: load_constant_i96_align16
916 ; CHECK: liveins: $sgpr0_sgpr1
918 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
919 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:sgpr(s128) = G_LOAD [[COPY]](p4) :: (invariant load (s128), addrspace 4)
920 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s96) = G_TRUNC [[LOAD]](s128)
921 ; CHECK-NEXT: S_ENDPGM 0, implicit [[TRUNC]](s96)
922 %0:_(p4) = COPY $sgpr0_sgpr1
923 %1:_(s96) = G_LOAD %0 :: (invariant load (s96), addrspace 4, align 16)
924 S_ENDPGM 0, implicit %1