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: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
25 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s8), addrspace 1)
26 ; GFX8-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 1
27 ; GFX8-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
28 ; GFX6-LABEL: name: test_sextload_global_i32_i1
29 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
30 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s8), addrspace 1)
31 ; GFX6-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 1
32 ; GFX6-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
33 %0:_(p1) = COPY $vgpr0_vgpr1
34 %1:_(s32) = G_SEXTLOAD %0 :: (load (s1), addrspace 1)
39 name: test_sextload_global_i32_i7
44 ; GFX8-LABEL: name: test_sextload_global_i32_i7
45 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
46 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s8), addrspace 1)
47 ; GFX8-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 7
48 ; GFX8-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
49 ; GFX6-LABEL: name: test_sextload_global_i32_i7
50 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
51 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s8), addrspace 1)
52 ; GFX6-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 7
53 ; GFX6-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
54 %0:_(p1) = COPY $vgpr0_vgpr1
55 %1:_(s32) = G_SEXTLOAD %0 :: (load (s7), addrspace 1)
59 name: test_sextload_global_i32_i24
64 ; GFX8-LABEL: name: test_sextload_global_i32_i24
65 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
66 ; GFX8-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p1) :: (load (s16), align 4, addrspace 1)
67 ; GFX8-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
68 ; GFX8-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
69 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[PTR_ADD]](p1) :: (load (s8) from unknown-address + 2, align 2, addrspace 1)
70 ; GFX8-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
71 ; GFX8-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[SEXTLOAD]], [[C1]](s32)
72 ; GFX8-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]]
73 ; GFX8-NEXT: $vgpr0 = COPY [[OR]](s32)
74 ; GFX6-LABEL: name: test_sextload_global_i32_i24
75 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
76 ; GFX6-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p1) :: (load (s16), align 4, addrspace 1)
77 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
78 ; GFX6-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
79 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[PTR_ADD]](p1) :: (load (s8) from unknown-address + 2, align 2, addrspace 1)
80 ; GFX6-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
81 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[SEXTLOAD]], [[C1]](s32)
82 ; GFX6-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]]
83 ; GFX6-NEXT: $vgpr0 = COPY [[OR]](s32)
84 %0:_(p1) = COPY $vgpr0_vgpr1
85 %1:_(s32) = G_SEXTLOAD %0 :: (load (s24), addrspace 1)
90 name: test_sextload_global_i32_i30
95 ; GFX8-LABEL: name: test_sextload_global_i32_i30
96 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
97 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
98 ; GFX8-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 30
99 ; GFX8-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
100 ; GFX6-LABEL: name: test_sextload_global_i32_i30
101 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
102 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
103 ; GFX6-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 30
104 ; GFX6-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
105 %0:_(p1) = COPY $vgpr0_vgpr1
106 %1:_(s32) = G_SEXTLOAD %0 :: (load (s30), addrspace 1)
111 name: test_sextload_global_i32_i31
114 liveins: $vgpr0_vgpr1
116 ; GFX8-LABEL: name: test_sextload_global_i32_i31
117 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
118 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
119 ; GFX8-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 31
120 ; GFX8-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
121 ; GFX6-LABEL: name: test_sextload_global_i32_i31
122 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
123 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
124 ; GFX6-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[LOAD]], 31
125 ; GFX6-NEXT: $vgpr0 = COPY [[SEXT_INREG]](s32)
126 %0:_(p1) = COPY $vgpr0_vgpr1
127 %1:_(s32) = G_SEXTLOAD %0 :: (load (s31), addrspace 1)
132 name: test_sextload_global_i32_i8
135 liveins: $vgpr0_vgpr1
137 ; GFX8-LABEL: name: test_sextload_global_i32_i8
138 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
139 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
140 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
141 ; GFX6-LABEL: name: test_sextload_global_i32_i8
142 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
143 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
144 ; GFX6-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
145 %0:_(p1) = COPY $vgpr0_vgpr1
146 %1:_(s32) = G_SEXTLOAD %0 :: (load (s8), addrspace 1)
151 name: test_sextload_global_i32_i16
154 liveins: $vgpr0_vgpr1
156 ; GFX8-LABEL: name: test_sextload_global_i32_i16
157 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
158 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), addrspace 1)
159 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
160 ; GFX6-LABEL: name: test_sextload_global_i32_i16
161 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
162 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), addrspace 1)
163 ; GFX6-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
164 %0:_(p1) = COPY $vgpr0_vgpr1
165 %1:_(s32) = G_SEXTLOAD %0 :: (load (s16), addrspace 1)
169 name: test_sextload_global_i31_i8
172 liveins: $vgpr0_vgpr1
174 ; GFX8-LABEL: name: test_sextload_global_i31_i8
175 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
176 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
177 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
178 ; GFX6-LABEL: name: test_sextload_global_i31_i8
179 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
180 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
181 ; GFX6-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
182 %0:_(p1) = COPY $vgpr0_vgpr1
183 %1:_(s31) = G_SEXTLOAD %0 :: (load (s8), addrspace 1)
184 %2:_(s32) = G_ANYEXT %1
188 name: test_sextload_global_i64_i8
191 liveins: $vgpr0_vgpr1
193 ; GFX8-LABEL: name: test_sextload_global_i64_i8
194 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
195 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
196 ; GFX8-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
197 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
198 ; GFX6-LABEL: name: test_sextload_global_i64_i8
199 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
200 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
201 ; GFX6-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
202 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
203 %0:_(p1) = COPY $vgpr0_vgpr1
204 %1:_(s64) = G_SEXTLOAD %0 :: (load (s8), addrspace 1)
205 $vgpr0_vgpr1 = COPY %1
208 name: test_sextload_global_i64_i16
211 liveins: $vgpr0_vgpr1
213 ; GFX8-LABEL: name: test_sextload_global_i64_i16
214 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
215 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), addrspace 1)
216 ; GFX8-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
217 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
218 ; GFX6-LABEL: name: test_sextload_global_i64_i16
219 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
220 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), addrspace 1)
221 ; GFX6-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
222 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
223 %0:_(p1) = COPY $vgpr0_vgpr1
224 %1:_(s64) = G_SEXTLOAD %0 :: (load (s16), addrspace 1)
225 $vgpr0_vgpr1 = COPY %1
228 name: test_sextload_global_i64_i32
231 liveins: $vgpr0_vgpr1
233 ; GFX8-LABEL: name: test_sextload_global_i64_i32
234 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
235 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
236 ; GFX8-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32)
237 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
238 ; GFX6-LABEL: name: test_sextload_global_i64_i32
239 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
240 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load (s32), addrspace 1)
241 ; GFX6-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32)
242 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
243 %0:_(p1) = COPY $vgpr0_vgpr1
244 %1:_(s64) = G_SEXTLOAD %0 :: (load (s32), addrspace 1)
245 $vgpr0_vgpr1 = COPY %1
249 name: test_sextload_global_s32_from_2_align1
252 liveins: $vgpr0_vgpr1
254 ; GFX8-LABEL: name: test_sextload_global_s32_from_2_align1
255 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
256 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), align 1, addrspace 1)
257 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
258 ; GFX6-LABEL: name: test_sextload_global_s32_from_2_align1
259 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
260 ; GFX6-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
261 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
262 ; GFX6-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
263 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[PTR_ADD]](p1) :: (load (s8) from unknown-address + 1, addrspace 1)
264 ; GFX6-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
265 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[SEXTLOAD]], [[C1]](s32)
266 ; GFX6-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]]
267 ; GFX6-NEXT: $vgpr0 = COPY [[OR]](s32)
268 %0:_(p1) = COPY $vgpr0_vgpr1
269 %1:_(s32) = G_SEXTLOAD %0 :: (load (s16), align 1, addrspace 1)
274 name: test_sextload_global_s64_from_2_align1
277 liveins: $vgpr0_vgpr1
279 ; GFX8-LABEL: name: test_sextload_global_s64_from_2_align1
280 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
281 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load (s16), align 1, addrspace 1)
282 ; GFX8-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
283 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
284 ; GFX6-LABEL: name: test_sextload_global_s64_from_2_align1
285 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
286 ; GFX6-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p1) :: (load (s8), addrspace 1)
287 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
288 ; GFX6-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
289 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[PTR_ADD]](p1) :: (load (s8) from unknown-address + 1, addrspace 1)
290 ; GFX6-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
291 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[SEXTLOAD]], [[C1]](s32)
292 ; GFX6-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]]
293 ; GFX6-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[OR]](s32)
294 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
295 %0:_(p1) = COPY $vgpr0_vgpr1
296 %1:_(s64) = G_SEXTLOAD %0 :: (load (s16), align 1, addrspace 1)
297 $vgpr0_vgpr1 = COPY %1
301 name: test_sextload_global_v2i16_from_v2s8
304 liveins: $vgpr0_vgpr1
306 ; GFX8-LABEL: name: test_sextload_global_v2i16_from_v2s8
307 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
308 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s16>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s8>), addrspace 1)
309 ; GFX8-NEXT: $vgpr0 = COPY [[SEXTLOAD]](<2 x s16>)
310 ; GFX6-LABEL: name: test_sextload_global_v2i16_from_v2s8
311 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
312 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s16>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s8>), addrspace 1)
313 ; GFX6-NEXT: $vgpr0 = COPY [[SEXTLOAD]](<2 x s16>)
314 %0:_(p1) = COPY $vgpr0_vgpr1
315 %1:_(<2 x s16>) = G_SEXTLOAD %0 :: (load (<2 x s8>), addrspace 1)
320 name: test_sextload_global_v2i32_from_v2s8
323 liveins: $vgpr0_vgpr1
325 ; GFX8-LABEL: name: test_sextload_global_v2i32_from_v2s8
326 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
327 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s32>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s8>), addrspace 1)
328 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXTLOAD]](<2 x s32>)
329 ; GFX6-LABEL: name: test_sextload_global_v2i32_from_v2s8
330 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
331 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s32>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s8>), addrspace 1)
332 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXTLOAD]](<2 x s32>)
333 %0:_(p1) = COPY $vgpr0_vgpr1
334 %1:_(<2 x s32>) = G_SEXTLOAD %0 :: (load (<2 x s8>), addrspace 1)
335 $vgpr0_vgpr1 = COPY %1
339 name: test_sextload_global_v2i32_from_v2s16
342 liveins: $vgpr0_vgpr1
344 ; GFX8-LABEL: name: test_sextload_global_v2i32_from_v2s16
345 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
346 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s32>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s16>), addrspace 1)
347 ; GFX8-NEXT: $vgpr0_vgpr1 = COPY [[SEXTLOAD]](<2 x s32>)
348 ; GFX6-LABEL: name: test_sextload_global_v2i32_from_v2s16
349 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
350 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s32>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s16>), addrspace 1)
351 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SEXTLOAD]](<2 x s32>)
352 %0:_(p1) = COPY $vgpr0_vgpr1
353 %1:_(<2 x s32>) = G_SEXTLOAD %0 :: (load (<2 x s16>), addrspace 1)
354 $vgpr0_vgpr1 = COPY %1
358 name: test_sextload_global_v2i64_from_v2s16
361 liveins: $vgpr0_vgpr1
363 ; GFX8-LABEL: name: test_sextload_global_v2i64_from_v2s16
364 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
365 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s64>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s16>), addrspace 1)
366 ; GFX8-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](<2 x s64>)
367 ; GFX6-LABEL: name: test_sextload_global_v2i64_from_v2s16
368 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
369 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s64>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s16>), addrspace 1)
370 ; GFX6-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](<2 x s64>)
371 %0:_(p1) = COPY $vgpr0_vgpr1
372 %1:_(<2 x s64>) = G_SEXTLOAD %0 :: (load (<2 x s16>), addrspace 1)
373 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
377 name: test_sextload_global_v2i64_from_v2s32
380 liveins: $vgpr0_vgpr1
382 ; GFX8-LABEL: name: test_sextload_global_v2i64_from_v2s32
383 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
384 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s64>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s32>), addrspace 1)
385 ; GFX8-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](<2 x s64>)
386 ; GFX6-LABEL: name: test_sextload_global_v2i64_from_v2s32
387 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
388 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(<2 x s64>) = G_SEXTLOAD [[COPY]](p1) :: (load (<2 x s32>), addrspace 1)
389 ; GFX6-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](<2 x s64>)
390 %0:_(p1) = COPY $vgpr0_vgpr1
391 %1:_(<2 x s64>) = G_SEXTLOAD %0 :: (load (<2 x s32>), addrspace 1)
392 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
396 name: test_sextload_global_s128_8
399 liveins: $vgpr0_vgpr1
401 ; GFX8-LABEL: name: test_sextload_global_s128_8
402 ; GFX8: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
403 ; GFX8-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s128) = G_SEXTLOAD [[COPY]](p1) :: (load (s64), addrspace 1)
404 ; GFX8-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](s128)
405 ; GFX6-LABEL: name: test_sextload_global_s128_8
406 ; GFX6: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
407 ; GFX6-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s128) = G_SEXTLOAD [[COPY]](p1) :: (load (s64), addrspace 1)
408 ; GFX6-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[SEXTLOAD]](s128)
409 %0:_(p1) = COPY $vgpr0_vgpr1
410 %1:_(s128) = G_SEXTLOAD %0 :: (load (s64), addrspace 1)
411 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1