• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -O0 -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -run-pass=legalizer %s -o - | FileCheck -check-prefix=GFX9 %s
3
4# The G_SHL will be split into <2 x s16>, introducing a
5# G_UNMERGE_VALUES of G_CONCAT_VECTORS. The artifact combiner should
6# eliminate the pair.
7---
8name: revisit_concat_vectors_unmerge_user
9tracksRegLiveness: true
10body:             |
11  bb.0:
12    liveins: $vgpr0_vgpr1
13
14    ; GFX9-LABEL: name: revisit_concat_vectors_unmerge_user
15    ; GFX9: liveins: $vgpr0_vgpr1
16    ; GFX9: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
17    ; GFX9: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
18    ; GFX9: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
19    ; GFX9: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
20    ; GFX9: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C1]](s32)
21    ; GFX9: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
22    ; GFX9: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C2]](s32)
23    ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
24    ; GFX9: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
25    ; GFX9: [[BUILD_VECTOR_TRUNC:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR_TRUNC [[COPY1]](s32), [[COPY2]](s32)
26    ; GFX9: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
27    ; GFX9: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
28    ; GFX9: [[BUILD_VECTOR_TRUNC1:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR_TRUNC [[COPY3]](s32), [[COPY4]](s32)
29    ; GFX9: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
30    ; GFX9: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
31    ; GFX9: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
32    ; GFX9: [[BUILD_VECTOR_TRUNC2:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR_TRUNC [[COPY5]](s32), [[COPY6]](s32)
33    ; GFX9: [[COPY7:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
34    ; GFX9: [[BUILD_VECTOR_TRUNC3:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR_TRUNC [[COPY7]](s32), [[C3]](s32)
35    ; GFX9: [[SHL:%[0-9]+]]:_(<2 x s16>) = G_SHL [[BUILD_VECTOR_TRUNC]], [[BUILD_VECTOR_TRUNC2]](<2 x s16>)
36    ; GFX9: [[SHL1:%[0-9]+]]:_(<2 x s16>) = G_SHL [[BUILD_VECTOR_TRUNC1]], [[BUILD_VECTOR_TRUNC3]](<2 x s16>)
37    ; GFX9: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[SHL]](<2 x s16>), [[SHL1]](<2 x s16>)
38    ; GFX9: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
39    %0:_(s32) = COPY $vgpr0
40    %1:_(<4 x s8>) = G_BITCAST %0
41    %2:_(s16) = G_CONSTANT i16 2
42    %3:_(<4 x s16>) = G_BUILD_VECTOR %2, %2, %2, %2
43    %4:_(<4 x s16>) = G_ANYEXT %1
44    %5:_(<4 x s16>) = G_SHL %4, %3
45    $vgpr0_vgpr1 = COPY %5
46...
47