AMDGPU/SI: Set the kill flag on temp VGPRs used to restore SGPRs from scratch
authorTom Stellard <thomas.stellard@amd.com>
Mon, 2 May 2016 19:37:56 +0000 (19:37 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 2 May 2016 19:37:56 +0000 (19:37 +0000)
commitce5e994887f7700da3b22bd1b027f52092e5cabb
tree1e5e5461269f83a9cb3f5f2630ba6c1b1e4214e7
parent4f8d21f3874064bed5fabb0ebecf57b33489aad6
AMDGPU/SI: Set the kill flag on temp VGPRs used to restore SGPRs from scratch

Summary:
When we restore an SGPR value from scratch, we first load it into a
temporary VGPR and then use v_readlane_b32 to copy the value from the
VGPR back into an SGPR.

We weren't setting the kill flag on the VGPR in the v_readlane_b32
instruction, so the register scavenger wasn't able to re-use this
temp value later.

I wasn't able to create a lit test for this.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D19744

llvm-svn: 268287
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp