AMDGPU: Fix verifier error from partially undef copy
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 15 Jul 2016 22:32:02 +0000 (22:32 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 15 Jul 2016 22:32:02 +0000 (22:32 +0000)
commit73d2f8954a25020f9ae79c081b5b1df76153f987
treec617f6ba337ef348d8b3081c5286b7adae5788bc
parentbe2e3f5ce55e5563d8e21fcd707bd563ddda77ee
AMDGPU: Fix verifier error from partially undef copy

In this situation:

%VGPR2<def> = BUFFER_LOAD_DWORD_OFFSET %SGPR8_SGPR9_SGPR10_SGPR11,
%VGPR7<def,tied3> = V_MAC_F32_e32 %VGPR0<undef>, %VGPR1<kill>, %VGPR7<kill,tied0>, %EXEC<imp-use>
%VGPR3_VGPR4_VGPR5_VGPR6<def> = COPY %VGPR0_VGPR1_VGPR2_VGPR3
%VGPR4<def> = COPY %VGPR2

The copy for VGPR1 -> VGPR4 was an error from reading undefined VGPR1,
but VGPR4 is defined immediately after this copy.

llvm-svn: 275635
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/undefined-subreg-liverange.ll