1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=fiji -run-pass=legalizer -global-isel-abort=2 -pass-remarks-missed='gisel*' -o - 2> %t %s | FileCheck -check-prefix=GFX8 %s
3 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer -global-isel-abort=2 -o - %s | FileCheck -check-prefix=GFX6 %s
4 # RUN: FileCheck -check-prefixes=ERR %s < %t
6 # FIXME: Run with and without unaligned access turned on
9 # ERR: remark: <unknown>:0:0: unable to legalize instruction: %1:_(<2 x s16>) = G_SEXTLOAD %0:_(p1) :: (load (<2 x s8>), addrspace 1) (in function: test_sextload_global_v2i16_from_v2s8)
10 # ERR-NEXT: remark: <unknown>:0:0: unable to legalize instruction: %1:_(<2 x s32>) = G_SEXTLOAD %0:_(p1) :: (load (<2 x s8>), addrspace 1) (in function: test_sextload_global_v2i32_from_v2s8)
11 # ERR-NEXT: remark: <unknown>:0:0: unable to legalize instruction: %1:_(<2 x s32>) = G_SEXTLOAD %0:_(p1) :: (load (<2 x s16>), addrspace 1) (in function: test_sextload_global_v2i32_from_v2s16)
12 # ERR-NEXT: remark: <unknown>:0:0: unable to legalize instruction: %1:_(<2 x s64>) = G_SEXTLOAD %0:_(p1) :: (load (<2 x s16>), addrspace 1) (in function: test_sextload_global_v2i64_from_v2s16)
13 # ERR-NEXT: remark: <unknown>:0:0: unable to legalize instruction: %1:_(<2 x s64>) = G_SEXTLOAD %0:_(p1) :: (load (<2 x s32>), addrspace 1) (in function: test_sextload_global_v2i64_from_v2s32)
14 # ERR-NEXT: remark: <unknown>:0:0: unable to legalize instruction: %1:_(s128) = G_SEXTLOAD %0:_(p1) :: (load (s64), addrspace 1) (in function: test_sextload_global_s128_8)
18 name: test_sextload_global_i32_i1
23 ; GFX8-LABEL: name: test_sextload_global_i32_i1
24 ; GFX8: liveins: $vgpr0_vgpr1
26 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
27 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s8), addrspace 1)
28 ; GFX8-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 1
29 ; GFX8-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
30 ; GFX6-LABEL: name: test_sextload_global_i32_i1
31 ; GFX6: liveins: $vgpr0_vgpr1
33 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
34 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s8), addrspace 1)
35 ; GFX6-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 1
36 ; GFX6-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
37 %0:_(p1) = COPY $vgpr0_vgpr1
38 %1:_(s32) = G_SEXTLOAD %0 :: (load (s1), addrspace 1)
43 name: test_sextload_global_i32_i7
48 ; GFX8-LABEL: name: test_sextload_global_i32_i7
49 ; GFX8: liveins: $vgpr0_vgpr1
51 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
52 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s8), addrspace 1)
53 ; GFX8-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 7
54 ; GFX8-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
55 ; GFX6-LABEL: name: test_sextload_global_i32_i7
56 ; GFX6: liveins: $vgpr0_vgpr1
58 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
59 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s8), addrspace 1)
60 ; GFX6-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 7
61 ; GFX6-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
62 %0:_(p1) = COPY $vgpr0_vgpr1
63 %1:_(s32) = G_SEXTLOAD %0 :: (load (s7), addrspace 1)
67 name: test_sextload_global_i32_i24
72 ; GFX8-LABEL: name: test_sextload_global_i32_i24
73 ; GFX8: liveins: $vgpr0_vgpr1
75 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
76 ; GFX8-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p1) :: (load (s16), align 4, addrspace 1)
77 ; GFX8-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
78 ; GFX8-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
79 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[PTR_ADD]](p1) :: (load (s8) from unknown-address + 2, align 2, addrspace 1)
80 ; GFX8-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
81 ; GFX8-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[SEXTLOAD]], [[C1]](s32)
82 ; GFX8-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]]
83 ; GFX8-NEXT: $vgpr0 = COPY [[OR]](s32)
84 ; GFX6-LABEL: name: test_sextload_global_i32_i24
85 ; GFX6: liveins: $vgpr0_vgpr1
87 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
88 ; GFX6-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p1) :: (load (s16), align 4, addrspace 1)
89 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
90 ; GFX6-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
91 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[PTR_ADD]](p1) :: (load (s8) from unknown-address + 2, align 2, addrspace 1)
92 ; GFX6-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
93 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[SEXTLOAD]], [[C1]](s32)
94 ; GFX6-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]]
95 ; GFX6-NEXT: $vgpr0 = COPY [[OR]](s32)
96 %0:_(p1) = COPY $vgpr0_vgpr1
97 %1:_(s32) = G_SEXTLOAD %0 :: (load (s24), addrspace 1)
102 name: test_sextload_global_i32_i30
105 liveins: $vgpr0_vgpr1
107 ; GFX8-LABEL: name: test_sextload_global_i32_i30
108 ; GFX8: liveins: $vgpr0_vgpr1
110 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
111 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
112 ; GFX8-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 30
113 ; GFX8-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
114 ; GFX6-LABEL: name: test_sextload_global_i32_i30
115 ; GFX6: liveins: $vgpr0_vgpr1
117 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
118 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
119 ; GFX6-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 30
120 ; GFX6-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
121 %0:_(p1) = COPY $vgpr0_vgpr1
122 %1:_(s32) = G_SEXTLOAD %0 :: (load (s30), addrspace 1)
127 name: test_sextload_global_i32_i31
130 liveins: $vgpr0_vgpr1
132 ; GFX8-LABEL: name: test_sextload_global_i32_i31
133 ; GFX8: liveins: $vgpr0_vgpr1
135 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
136 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
137 ; GFX8-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 31
138 ; GFX8-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
139 ; GFX6-LABEL: name: test_sextload_global_i32_i31
140 ; GFX6: liveins: $vgpr0_vgpr1
142 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
143 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
144 ; GFX6-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 31
145 ; GFX6-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
146 %0:_(p1) = COPY $vgpr0_vgpr1
147 %1:_(s32) = G_SEXTLOAD %0 :: (load (s31), addrspace 1)
152 name: test_sextload_global_i32_i8
155 liveins: $vgpr0_vgpr1
157 ; GFX8-LABEL: name: test_sextload_global_i32_i8
158 ; GFX8: liveins: $vgpr0_vgpr1
160 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
161 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
162 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
163 ; GFX6-LABEL: name: test_sextload_global_i32_i8
164 ; GFX6: liveins: $vgpr0_vgpr1
166 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
167 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
168 ; GFX6-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
169 %0:_(p1) = COPY $vgpr0_vgpr1
170 %1:_(s32) = G_SEXTLOAD %0 :: (load (s8), addrspace 1)
175 name: test_sextload_global_i32_i16
178 liveins: $vgpr0_vgpr1
180 ; GFX8-LABEL: name: test_sextload_global_i32_i16
181 ; GFX8: liveins: $vgpr0_vgpr1
183 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
184 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), addrspace 1)
185 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
186 ; GFX6-LABEL: name: test_sextload_global_i32_i16
187 ; GFX6: liveins: $vgpr0_vgpr1
189 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
190 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), addrspace 1)
191 ; GFX6-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
192 %0:_(p1) = COPY $vgpr0_vgpr1
193 %1:_(s32) = G_SEXTLOAD %0 :: (load (s16), addrspace 1)
197 name: test_sextload_global_i31_i8
200 liveins: $vgpr0_vgpr1
202 ; GFX8-LABEL: name: test_sextload_global_i31_i8
203 ; GFX8: liveins: $vgpr0_vgpr1
205 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
206 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
207 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
208 ; GFX6-LABEL: name: test_sextload_global_i31_i8
209 ; GFX6: liveins: $vgpr0_vgpr1
211 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
212 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
213 ; GFX6-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
214 %0:_(p1) = COPY $vgpr0_vgpr1
215 %1:_(s31) = G_SEXTLOAD %0 :: (load (s8), addrspace 1)
216 %2:_(s32) = G_ANYEXT %1
220 name: test_sextload_global_i64_i8
223 liveins: $vgpr0_vgpr1
225 ; GFX8-LABEL: name: test_sextload_global_i64_i8
226 ; GFX8: liveins: $vgpr0_vgpr1
228 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
229 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
230 ; GFX8-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
231 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
232 ; GFX6-LABEL: name: test_sextload_global_i64_i8
233 ; GFX6: liveins: $vgpr0_vgpr1
235 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
236 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
237 ; GFX6-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
238 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
239 %0:_(p1) = COPY $vgpr0_vgpr1
240 %1:_(s64) = G_SEXTLOAD %0 :: (load (s8), addrspace 1)
241 $vgpr0_vgpr1 = COPY %1
244 name: test_sextload_global_i64_i16
247 liveins: $vgpr0_vgpr1
249 ; GFX8-LABEL: name: test_sextload_global_i64_i16
250 ; GFX8: liveins: $vgpr0_vgpr1
252 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
253 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), addrspace 1)
254 ; GFX8-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
255 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
256 ; GFX6-LABEL: name: test_sextload_global_i64_i16
257 ; GFX6: liveins: $vgpr0_vgpr1
259 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
260 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), addrspace 1)
261 ; GFX6-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
262 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
263 %0:_(p1) = COPY $vgpr0_vgpr1
264 %1:_(s64) = G_SEXTLOAD %0 :: (load (s16), addrspace 1)
265 $vgpr0_vgpr1 = COPY %1
268 name: test_sextload_global_i64_i32
271 liveins: $vgpr0_vgpr1
273 ; GFX8-LABEL: name: test_sextload_global_i64_i32
274 ; GFX8: liveins: $vgpr0_vgpr1
276 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
277 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
278 ; GFX8-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32)
279 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
280 ; GFX6-LABEL: name: test_sextload_global_i64_i32
281 ; GFX6: liveins: $vgpr0_vgpr1
283 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
284 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
285 ; GFX6-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32)
286 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
287 %0:_(p1) = COPY $vgpr0_vgpr1
288 %1:_(s64) = G_SEXTLOAD %0 :: (load (s32), addrspace 1)
289 $vgpr0_vgpr1 = COPY %1
293 name: test_sextload_global_s32_from_2_align1
296 liveins: $vgpr0_vgpr1
298 ; GFX8-LABEL: name: test_sextload_global_s32_from_2_align1
299 ; GFX8: liveins: $vgpr0_vgpr1
301 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
302 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), align 1, addrspace 1)
303 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
304 ; GFX6-LABEL: name: test_sextload_global_s32_from_2_align1
305 ; GFX6: liveins: $vgpr0_vgpr1
307 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
308 ; GFX6-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
309 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
310 ; GFX6-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
311 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[PTR_ADD]](p1) :: (load (s8) from unknown-address + 1, addrspace 1)
312 ; GFX6-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
313 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[SEXTLOAD]], [[C1]](s32)
314 ; GFX6-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]]
315 ; GFX6-NEXT: $vgpr0 = COPY [[OR]](s32)
316 %0:_(p1) = COPY $vgpr0_vgpr1
317 %1:_(s32) = G_SEXTLOAD %0 :: (load (s16), align 1, addrspace 1)
322 name: test_sextload_global_s64_from_2_align1
325 liveins: $vgpr0_vgpr1
327 ; GFX8-LABEL: name: test_sextload_global_s64_from_2_align1
328 ; GFX8: liveins: $vgpr0_vgpr1
330 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
331 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), align 1, addrspace 1)
332 ; GFX8-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
333 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
334 ; GFX6-LABEL: name: test_sextload_global_s64_from_2_align1
335 ; GFX6: liveins: $vgpr0_vgpr1
337 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
338 ; GFX6-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
339 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
340 ; GFX6-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
341 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[PTR_ADD]](p1) :: (load (s8) from unknown-address + 1, addrspace 1)
342 ; GFX6-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
343 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[SEXTLOAD]], [[C1]](s32)
344 ; GFX6-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]]
345 ; GFX6-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[OR]](s32)
346 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
347 %0:_(p1) = COPY $vgpr0_vgpr1
348 %1:_(s64) = G_SEXTLOAD %0 :: (load (s16), align 1, addrspace 1)
349 $vgpr0_vgpr1 = COPY %1
353 name: test_sextload_global_v2i16_from_v2s8
356 liveins: $vgpr0_vgpr1
358 ; GFX8-LABEL: name: test_sextload_global_v2i16_from_v2s8
359 ; GFX8: liveins: $vgpr0_vgpr1
361 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
362 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s16>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s8>), addrspace 1)
363 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](<2 x s16>)
364 ; GFX6-LABEL: name: test_sextload_global_v2i16_from_v2s8
365 ; GFX6: liveins: $vgpr0_vgpr1
367 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
368 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s16>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s8>), addrspace 1)
369 ; GFX6-NEXT: $vgpr0 = COPY [[SEXTLOAD]](<2 x s16>)
370 %0:_(p1) = COPY $vgpr0_vgpr1
371 %1:_(<2 x s16>) = G_SEXTLOAD %0 :: (load (<2 x s8>), addrspace 1)
376 name: test_sextload_global_v2i32_from_v2s8
379 liveins: $vgpr0_vgpr1
381 ; GFX8-LABEL: name: test_sextload_global_v2i32_from_v2s8
382 ; GFX8: liveins: $vgpr0_vgpr1
384 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
385 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s32>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s8>), addrspace 1)
386 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXTLOAD]](<2 x s32>)
387 ; GFX6-LABEL: name: test_sextload_global_v2i32_from_v2s8
388 ; GFX6: liveins: $vgpr0_vgpr1
390 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
391 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s32>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s8>), addrspace 1)
392 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXTLOAD]](<2 x s32>)
393 %0:_(p1) = COPY $vgpr0_vgpr1
394 %1:_(<2 x s32>) = G_SEXTLOAD %0 :: (load (<2 x s8>), addrspace 1)
395 $vgpr0_vgpr1 = COPY %1
399 name: test_sextload_global_v2i32_from_v2s16
402 liveins: $vgpr0_vgpr1
404 ; GFX8-LABEL: name: test_sextload_global_v2i32_from_v2s16
405 ; GFX8: liveins: $vgpr0_vgpr1
407 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
408 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s32>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s16>), addrspace 1)
409 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXTLOAD]](<2 x s32>)
410 ; GFX6-LABEL: name: test_sextload_global_v2i32_from_v2s16
411 ; GFX6: liveins: $vgpr0_vgpr1
413 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
414 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s32>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s16>), addrspace 1)
415 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXTLOAD]](<2 x s32>)
416 %0:_(p1) = COPY $vgpr0_vgpr1
417 %1:_(<2 x s32>) = G_SEXTLOAD %0 :: (load (<2 x s16>), addrspace 1)
418 $vgpr0_vgpr1 = COPY %1
422 name: test_sextload_global_v2i64_from_v2s16
425 liveins: $vgpr0_vgpr1
427 ; GFX8-LABEL: name: test_sextload_global_v2i64_from_v2s16
428 ; GFX8: liveins: $vgpr0_vgpr1
430 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
431 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s64>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s16>), addrspace 1)
432 ; GFX8-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](<2 x s64>)
433 ; GFX6-LABEL: name: test_sextload_global_v2i64_from_v2s16
434 ; GFX6: liveins: $vgpr0_vgpr1
436 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
437 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s64>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s16>), addrspace 1)
438 ; GFX6-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](<2 x s64>)
439 %0:_(p1) = COPY $vgpr0_vgpr1
440 %1:_(<2 x s64>) = G_SEXTLOAD %0 :: (load (<2 x s16>), addrspace 1)
441 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
445 name: test_sextload_global_v2i64_from_v2s32
448 liveins: $vgpr0_vgpr1
450 ; GFX8-LABEL: name: test_sextload_global_v2i64_from_v2s32
451 ; GFX8: liveins: $vgpr0_vgpr1
453 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
454 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s64>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s32>), addrspace 1)
455 ; GFX8-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](<2 x s64>)
456 ; GFX6-LABEL: name: test_sextload_global_v2i64_from_v2s32
457 ; GFX6: liveins: $vgpr0_vgpr1
459 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
460 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s64>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s32>), addrspace 1)
461 ; GFX6-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](<2 x s64>)
462 %0:_(p1) = COPY $vgpr0_vgpr1
463 %1:_(<2 x s64>) = G_SEXTLOAD %0 :: (load (<2 x s32>), addrspace 1)
464 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
468 name: test_sextload_global_s128_8
471 liveins: $vgpr0_vgpr1
473 ; GFX8-LABEL: name: test_sextload_global_s128_8
474 ; GFX8: liveins: $vgpr0_vgpr1
476 ; GFX8-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
477 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s128) = G_SEXTLOAD [[COPY]](p1) :: (load (s64), addrspace 1)
478 ; GFX8-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](s128)
479 ; GFX6-LABEL: name: test_sextload_global_s128_8
480 ; GFX6: liveins: $vgpr0_vgpr1
482 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
483 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s128) = G_SEXTLOAD [[COPY]](p1) :: (load (s64), addrspace 1)
484 ; GFX6-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](s128)
485 %0:_(p1) = COPY $vgpr0_vgpr1
486 %1:_(s128) = G_SEXTLOAD %0 :: (load (s64), addrspace 1)
487 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1