1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=amdgpu-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX6 %s
3 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -run-pass=amdgpu-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX9 %s
5 # Can't narrow this; need known bits
7 name: shl_s64_by_2_from_anyext_s32
8 tracksRegLiveness: true
14 ; GFX6-LABEL: name: shl_s64_by_2_from_anyext_s32
15 ; GFX6: liveins: $vgpr0
17 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
18 ; GFX6-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[COPY]](s32)
19 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
20 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[ANYEXT]], [[C]](s32)
21 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SHL]](s64)
23 ; GFX9-LABEL: name: shl_s64_by_2_from_anyext_s32
24 ; GFX9: liveins: $vgpr0
26 ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
27 ; GFX9-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[COPY]](s32)
28 ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
29 ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[ANYEXT]], [[C]](s32)
30 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[SHL]](s64)
31 %0:_(s32) = COPY $vgpr0
32 %1:_(s64) = G_ANYEXT %0
33 %2:_(s32) = G_CONSTANT i32 2
34 %3:_(s64) = G_SHL %1, %2
35 $vgpr0_vgpr1 = COPY %3
38 # Can't narrow this; need known bits
40 name: shl_s64_by_2_from_sext_s32
41 tracksRegLiveness: true
47 ; GFX6-LABEL: name: shl_s64_by_2_from_sext_s32
48 ; GFX6: liveins: $vgpr0
50 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
51 ; GFX6-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s32)
52 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
53 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[SEXT]], [[C]](s32)
54 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SHL]](s64)
56 ; GFX9-LABEL: name: shl_s64_by_2_from_sext_s32
57 ; GFX9: liveins: $vgpr0
59 ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
60 ; GFX9-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s32)
61 ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
62 ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[SEXT]], [[C]](s32)
63 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[SHL]](s64)
64 %0:_(s32) = COPY $vgpr0
66 %2:_(s32) = G_CONSTANT i32 2
67 %3:_(s64) = G_SHL %1, %2
68 $vgpr0_vgpr1 = COPY %3
71 # Can't narrow this; need known bits
73 name: shl_s64_by_2_from_zext_s32
74 tracksRegLiveness: true
80 ; GFX6-LABEL: name: shl_s64_by_2_from_zext_s32
81 ; GFX6: liveins: $vgpr0
83 ; GFX6-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
84 ; GFX6-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s32)
85 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
86 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[ZEXT]], [[C]](s32)
87 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY [[SHL]](s64)
89 ; GFX9-LABEL: name: shl_s64_by_2_from_zext_s32
90 ; GFX9: liveins: $vgpr0
92 ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
93 ; GFX9-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s32)
94 ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
95 ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[ZEXT]], [[C]](s32)
96 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[SHL]](s64)
97 %0:_(s32) = COPY $vgpr0
99 %2:_(s32) = G_CONSTANT i32 2
100 %3:_(s64) = G_SHL %1, %2
101 $vgpr0_vgpr1 = COPY %3
105 name: narrow_shl_s64_by_2_from_anyext_s32
106 tracksRegLiveness: true
112 ; GFX6-LABEL: name: narrow_shl_s64_by_2_from_anyext_s32
113 ; GFX6: liveins: $vgpr0
115 ; GFX6-NEXT: %narrow:_(s32) = COPY $vgpr0
116 ; GFX6-NEXT: %masklow30:_(s32) = G_CONSTANT i32 1073741823
117 ; GFX6-NEXT: %masked:_(s32) = G_AND %narrow, %masklow30
118 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
119 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %masked, [[C]](s32)
120 ; GFX6-NEXT: %shl:_(s64) = G_ZEXT [[SHL]](s32)
121 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
123 ; GFX9-LABEL: name: narrow_shl_s64_by_2_from_anyext_s32
124 ; GFX9: liveins: $vgpr0
126 ; GFX9-NEXT: %narrow:_(s32) = COPY $vgpr0
127 ; GFX9-NEXT: %masklow30:_(s32) = G_CONSTANT i32 1073741823
128 ; GFX9-NEXT: %masked:_(s32) = G_AND %narrow, %masklow30
129 ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
130 ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %masked, [[C]](s32)
131 ; GFX9-NEXT: %shl:_(s64) = G_ZEXT [[SHL]](s32)
132 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
133 %narrow:_(s32) = COPY $vgpr0
134 %masklow30:_(s32) = G_CONSTANT i32 1073741823
135 %masked:_(s32) = G_AND %narrow, %masklow30
136 %extend:_(s64) = G_ANYEXT %masked
137 %shiftamt:_(s32) = G_CONSTANT i32 2
138 %shl:_(s64) = G_SHL %extend, %shiftamt
139 $vgpr0_vgpr1 = COPY %shl
143 name: narrow_shl_s64_by_2_from_zext_s32
144 tracksRegLiveness: true
150 ; GFX6-LABEL: name: narrow_shl_s64_by_2_from_zext_s32
151 ; GFX6: liveins: $vgpr0
153 ; GFX6-NEXT: %narrow:_(s32) = COPY $vgpr0
154 ; GFX6-NEXT: %masklow30:_(s32) = G_CONSTANT i32 1073741823
155 ; GFX6-NEXT: %masked:_(s32) = G_AND %narrow, %masklow30
156 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
157 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %masked, [[C]](s32)
158 ; GFX6-NEXT: %shl:_(s64) = G_ZEXT [[SHL]](s32)
159 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
161 ; GFX9-LABEL: name: narrow_shl_s64_by_2_from_zext_s32
162 ; GFX9: liveins: $vgpr0
164 ; GFX9-NEXT: %narrow:_(s32) = COPY $vgpr0
165 ; GFX9-NEXT: %masklow30:_(s32) = G_CONSTANT i32 1073741823
166 ; GFX9-NEXT: %masked:_(s32) = G_AND %narrow, %masklow30
167 ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
168 ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %masked, [[C]](s32)
169 ; GFX9-NEXT: %shl:_(s64) = G_ZEXT [[SHL]](s32)
170 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
171 %narrow:_(s32) = COPY $vgpr0
172 %masklow30:_(s32) = G_CONSTANT i32 1073741823
173 %masked:_(s32) = G_AND %narrow, %masklow30
174 %extend:_(s64) = G_ZEXT %masked
175 %shiftamt:_(s32) = G_CONSTANT i32 2
176 %shl:_(s64) = G_SHL %extend, %shiftamt
177 $vgpr0_vgpr1 = COPY %shl
181 name: narrow_shl_s64_by_2_from_sext_s32
182 tracksRegLiveness: true
188 ; GFX6-LABEL: name: narrow_shl_s64_by_2_from_sext_s32
189 ; GFX6: liveins: $vgpr0
191 ; GFX6-NEXT: %narrow:_(s32) = COPY $vgpr0
192 ; GFX6-NEXT: %masklow30:_(s32) = G_CONSTANT i32 1073741823
193 ; GFX6-NEXT: %masked:_(s32) = G_AND %narrow, %masklow30
194 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
195 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %masked, [[C]](s32)
196 ; GFX6-NEXT: %shl:_(s64) = G_ZEXT [[SHL]](s32)
197 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
199 ; GFX9-LABEL: name: narrow_shl_s64_by_2_from_sext_s32
200 ; GFX9: liveins: $vgpr0
202 ; GFX9-NEXT: %narrow:_(s32) = COPY $vgpr0
203 ; GFX9-NEXT: %masklow30:_(s32) = G_CONSTANT i32 1073741823
204 ; GFX9-NEXT: %masked:_(s32) = G_AND %narrow, %masklow30
205 ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
206 ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %masked, [[C]](s32)
207 ; GFX9-NEXT: %shl:_(s64) = G_ZEXT [[SHL]](s32)
208 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
209 %narrow:_(s32) = COPY $vgpr0
210 %masklow30:_(s32) = G_CONSTANT i32 1073741823
211 %masked:_(s32) = G_AND %narrow, %masklow30
212 %extend:_(s64) = G_SEXT %masked
213 %shiftamt:_(s32) = G_CONSTANT i32 2
214 %shl:_(s64) = G_SHL %extend, %shiftamt
215 $vgpr0_vgpr1 = COPY %shl
219 name: narrow_shl_s64_by_2_from_zext_s32_lookthrough_amount
220 tracksRegLiveness: true
226 ; GFX6-LABEL: name: narrow_shl_s64_by_2_from_zext_s32_lookthrough_amount
227 ; GFX6: liveins: $vgpr0
229 ; GFX6-NEXT: %narrow:_(s32) = COPY $vgpr0
230 ; GFX6-NEXT: %masklow30:_(s32) = G_CONSTANT i32 1073741823
231 ; GFX6-NEXT: %masked:_(s32) = G_AND %narrow, %masklow30
232 ; GFX6-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
233 ; GFX6-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %masked, [[C]](s32)
234 ; GFX6-NEXT: %shl:_(s64) = G_ZEXT [[SHL]](s32)
235 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
237 ; GFX9-LABEL: name: narrow_shl_s64_by_2_from_zext_s32_lookthrough_amount
238 ; GFX9: liveins: $vgpr0
240 ; GFX9-NEXT: %narrow:_(s32) = COPY $vgpr0
241 ; GFX9-NEXT: %masklow30:_(s32) = G_CONSTANT i32 1073741823
242 ; GFX9-NEXT: %masked:_(s32) = G_AND %narrow, %masklow30
243 ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
244 ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %masked, [[C]](s32)
245 ; GFX9-NEXT: %shl:_(s64) = G_ZEXT [[SHL]](s32)
246 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
247 %narrow:_(s32) = COPY $vgpr0
248 %masklow30:_(s32) = G_CONSTANT i32 1073741823
249 %masked:_(s32) = G_AND %narrow, %masklow30
250 %extend:_(s64) = G_ZEXT %masked
251 %shiftamt64:_(s64) = G_CONSTANT i64 2
252 %shiftamt:_(s32) = G_TRUNC %shiftamt64
253 %shl:_(s64) = G_SHL %extend, %shiftamt
254 $vgpr0_vgpr1 = COPY %shl
257 # Can't introduce a 16-bit shift before gfx8
259 name: narrow_shl_s32_by_2_from_zext_s16
260 tracksRegLiveness: true
266 ; GFX6-LABEL: name: narrow_shl_s32_by_2_from_zext_s16
267 ; GFX6: liveins: $vgpr0
269 ; GFX6-NEXT: %argument:_(s32) = COPY $vgpr0
270 ; GFX6-NEXT: %narrow:_(s16) = G_TRUNC %argument(s32)
271 ; GFX6-NEXT: %masklow14:_(s16) = G_CONSTANT i16 16383
272 ; GFX6-NEXT: %masked:_(s16) = G_AND %narrow, %masklow14
273 ; GFX6-NEXT: %extend:_(s32) = G_ZEXT %masked(s16)
274 ; GFX6-NEXT: %shiftamt:_(s32) = G_CONSTANT i32 2
275 ; GFX6-NEXT: %shl:_(s32) = G_SHL %extend, %shiftamt(s32)
276 ; GFX6-NEXT: $vgpr0 = COPY %shl(s32)
278 ; GFX9-LABEL: name: narrow_shl_s32_by_2_from_zext_s16
279 ; GFX9: liveins: $vgpr0
281 ; GFX9-NEXT: %argument:_(s32) = COPY $vgpr0
282 ; GFX9-NEXT: %narrow:_(s16) = G_TRUNC %argument(s32)
283 ; GFX9-NEXT: %masklow14:_(s16) = G_CONSTANT i16 16383
284 ; GFX9-NEXT: %masked:_(s16) = G_AND %narrow, %masklow14
285 ; GFX9-NEXT: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 2
286 ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s16) = G_SHL %masked, [[C]](s16)
287 ; GFX9-NEXT: %shl:_(s32) = G_ZEXT [[SHL]](s16)
288 ; GFX9-NEXT: $vgpr0 = COPY %shl(s32)
289 %argument:_(s32) = COPY $vgpr0
290 %narrow:_(s16) = G_TRUNC %argument
291 %masklow14:_(s16) = G_CONSTANT i16 16383
292 %masked:_(s16) = G_AND %narrow, %masklow14
293 %extend:_(s32) = G_ZEXT %masked
294 %shiftamt:_(s32) = G_CONSTANT i32 2
295 %shl:_(s32) = G_SHL %extend, %shiftamt
300 name: narrow_shl_s64_by_2_from_zext_s16
301 tracksRegLiveness: true
307 ; GFX6-LABEL: name: narrow_shl_s64_by_2_from_zext_s16
308 ; GFX6: liveins: $vgpr0
310 ; GFX6-NEXT: %argument:_(s32) = COPY $vgpr0
311 ; GFX6-NEXT: %narrow:_(s16) = G_TRUNC %argument(s32)
312 ; GFX6-NEXT: %masklow14:_(s16) = G_CONSTANT i16 16383
313 ; GFX6-NEXT: %masked:_(s16) = G_AND %narrow, %masklow14
314 ; GFX6-NEXT: %extend:_(s64) = G_ZEXT %masked(s16)
315 ; GFX6-NEXT: %shiftamt:_(s32) = G_CONSTANT i32 2
316 ; GFX6-NEXT: %shl:_(s64) = G_SHL %extend, %shiftamt(s32)
317 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
319 ; GFX9-LABEL: name: narrow_shl_s64_by_2_from_zext_s16
320 ; GFX9: liveins: $vgpr0
322 ; GFX9-NEXT: %argument:_(s32) = COPY $vgpr0
323 ; GFX9-NEXT: %narrow:_(s16) = G_TRUNC %argument(s32)
324 ; GFX9-NEXT: %masklow14:_(s16) = G_CONSTANT i16 16383
325 ; GFX9-NEXT: %masked:_(s16) = G_AND %narrow, %masklow14
326 ; GFX9-NEXT: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 2
327 ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s16) = G_SHL %masked, [[C]](s16)
328 ; GFX9-NEXT: %shl:_(s64) = G_ZEXT [[SHL]](s16)
329 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY %shl(s64)
330 %argument:_(s32) = COPY $vgpr0
331 %narrow:_(s16) = G_TRUNC %argument
332 %masklow14:_(s16) = G_CONSTANT i16 16383
333 %masked:_(s16) = G_AND %narrow, %masklow14
334 %extend:_(s64) = G_ZEXT %masked
335 %shiftamt:_(s32) = G_CONSTANT i32 2
336 %shl:_(s64) = G_SHL %extend, %shiftamt
337 $vgpr0_vgpr1 = COPY %shl
341 name: do_not_shl_s32_zero_by_16_from_zext_s16
342 tracksRegLiveness: true
348 ; GFX6-LABEL: name: do_not_shl_s32_zero_by_16_from_zext_s16
349 ; GFX6: liveins: $vgpr0
351 ; GFX6-NEXT: %shl:_(s32) = G_CONSTANT i32 0
352 ; GFX6-NEXT: $vgpr0 = COPY %shl(s32)
354 ; GFX9-LABEL: name: do_not_shl_s32_zero_by_16_from_zext_s16
355 ; GFX9: liveins: $vgpr0
357 ; GFX9-NEXT: %shl:_(s32) = G_CONSTANT i32 0
358 ; GFX9-NEXT: $vgpr0 = COPY %shl(s32)
359 %zero:_(s16) = G_CONSTANT i16 0
360 %extend:_(s32) = G_ZEXT %zero:_(s16)
361 %shiftamt:_(s16) = G_CONSTANT i16 16
362 %shl:_(s32) = G_SHL %extend, %shiftamt(s16)
367 name: do_not_shl_v2s32_zero_by_16_from_zext_v2s16
368 tracksRegLiveness: true
374 ; GFX6-LABEL: name: do_not_shl_v2s32_zero_by_16_from_zext_v2s16
375 ; GFX6: liveins: $vgpr0
377 ; GFX6-NEXT: %zero:_(s16) = G_CONSTANT i16 0
378 ; GFX6-NEXT: %zerovector:_(<2 x s16>) = G_BUILD_VECTOR %zero(s16), %zero(s16)
379 ; GFX6-NEXT: %shiftamt:_(s16) = G_CONSTANT i16 16
380 ; GFX6-NEXT: %shiftamtvector:_(<2 x s16>) = G_BUILD_VECTOR %shiftamt(s16), %shiftamt(s16)
381 ; GFX6-NEXT: %extend:_(<2 x s32>) = G_ZEXT %zerovector(<2 x s16>)
382 ; GFX6-NEXT: %shl:_(<2 x s32>) = G_SHL %extend, %shiftamtvector(<2 x s16>)
383 ; GFX6-NEXT: $vgpr0_vgpr1 = COPY %shl(<2 x s32>)
385 ; GFX9-LABEL: name: do_not_shl_v2s32_zero_by_16_from_zext_v2s16
386 ; GFX9: liveins: $vgpr0
388 ; GFX9-NEXT: %zero:_(s16) = G_CONSTANT i16 0
389 ; GFX9-NEXT: %zerovector:_(<2 x s16>) = G_BUILD_VECTOR %zero(s16), %zero(s16)
390 ; GFX9-NEXT: %shiftamt:_(s16) = G_CONSTANT i16 16
391 ; GFX9-NEXT: %shiftamtvector:_(<2 x s16>) = G_BUILD_VECTOR %shiftamt(s16), %shiftamt(s16)
392 ; GFX9-NEXT: %extend:_(<2 x s32>) = G_ZEXT %zerovector(<2 x s16>)
393 ; GFX9-NEXT: %shl:_(<2 x s32>) = G_SHL %extend, %shiftamtvector(<2 x s16>)
394 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY %shl(<2 x s32>)
395 %zero:_(s16) = G_CONSTANT i16 0
396 %zerovector:_(<2 x s16>) = G_BUILD_VECTOR %zero, %zero:_(s16)
397 %shiftamt:_(s16) = G_CONSTANT i16 16
398 %shiftamtvector:_(<2 x s16>) = G_BUILD_VECTOR %shiftamt, %shiftamt:_(s16)
399 %extend:_(<2 x s32>) = G_ZEXT %zerovector:_(<2 x s16>)
400 %shl:_(<2 x s32>) = G_SHL %extend, %shiftamtvector
401 $vgpr0_vgpr1 = COPY %shl
405 name: do_not_shl_s32_by_16_from_zext_s16
406 tracksRegLiveness: true
412 ; GFX6-LABEL: name: do_not_shl_s32_by_16_from_zext_s16
413 ; GFX6: liveins: $vgpr0
415 ; GFX6-NEXT: %argument:_(s32) = COPY $vgpr0
416 ; GFX6-NEXT: %truncate:_(s16) = G_TRUNC %argument(s32)
417 ; GFX6-NEXT: %shiftamt:_(s16) = G_CONSTANT i16 16
418 ; GFX6-NEXT: %extend:_(s32) = G_ZEXT %truncate(s16)
419 ; GFX6-NEXT: %shl:_(s32) = G_SHL %extend, %shiftamt(s16)
420 ; GFX6-NEXT: $vgpr0 = COPY %shl(s32)
422 ; GFX9-LABEL: name: do_not_shl_s32_by_16_from_zext_s16
423 ; GFX9: liveins: $vgpr0
425 ; GFX9-NEXT: %argument:_(s32) = COPY $vgpr0
426 ; GFX9-NEXT: %truncate:_(s16) = G_TRUNC %argument(s32)
427 ; GFX9-NEXT: %shiftamt:_(s16) = G_CONSTANT i16 16
428 ; GFX9-NEXT: %extend:_(s32) = G_ZEXT %truncate(s16)
429 ; GFX9-NEXT: %shl:_(s32) = G_SHL %extend, %shiftamt(s16)
430 ; GFX9-NEXT: $vgpr0 = COPY %shl(s32)
431 %argument:_(s32) = COPY $vgpr0
432 %truncate:_(s16) = G_TRUNC %argument:_(s32)
433 %shiftamt:_(s16) = G_CONSTANT i16 16
434 %extend:_(s32) = G_ZEXT %truncate:_(s16)
435 %shl:_(s32) = G_SHL %extend, %shiftamt(s16)