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_ZEXT and G_SHL will be scalarized, introducing a 5# G_UNMERGE_VALUES of G_BUILD_VECTOR. The artifact combiner should 6# eliminate the pair. 7--- 8name: revisit_build_vector_unmerge_user 9tracksRegLiveness: true 10body: | 11 bb.0: 12 liveins: $vgpr0_vgpr1 13 14 ; GFX9-LABEL: name: revisit_build_vector_unmerge_user 15 ; GFX9: liveins: $vgpr0_vgpr1 16 ; GFX9: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1 17 ; GFX9: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 18 ; GFX9: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>) 19 ; GFX9: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[UV]](s32) 20 ; GFX9: [[ZEXT1:%[0-9]+]]:_(s64) = G_ZEXT [[UV1]](s32) 21 ; GFX9: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[ZEXT]], [[C]](s32) 22 ; GFX9: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[ZEXT1]], [[C]](s32) 23 ; GFX9: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[SHL]](s64), [[SHL1]](s64) 24 ; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>) 25 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1 26 %1:_(s32) = G_CONSTANT i32 2 27 %2:_(<2 x s32>) = G_BUILD_VECTOR %1, %1 28 %3:_(<2 x s64>) = G_ZEXT %0 29 %4:_(<2 x s64>) = G_SHL %3, %2 30 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4 31... 32