diff options
| author | Tom Stellard <thomas.stellard@amd.com> | 2016-05-02 19:37:56 +0000 |
|---|---|---|
| committer | Tom Stellard <thomas.stellard@amd.com> | 2016-05-02 19:37:56 +0000 |
| commit | ce5e994887f7700da3b22bd1b027f52092e5cabb (patch) | |
| tree | 1e5e5461269f83a9cb3f5f2630ba6c1b1e4214e7 /llvm/lib | |
| parent | 4f8d21f3874064bed5fabb0ebecf57b33489aad6 (diff) | |
| download | bcm5719-llvm-ce5e994887f7700da3b22bd1b027f52092e5cabb.tar.gz bcm5719-llvm-ce5e994887f7700da3b22bd1b027f52092e5cabb.zip | |
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
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp b/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp index d0ba8e68507..9012b3110b3 100644 --- a/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp +++ b/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp @@ -590,7 +590,7 @@ void SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI, .addMemOperand(MMO); BuildMI(*MBB, MI, DL, TII->getMCOpcodeFromPseudo(AMDGPU::V_READLANE_B32), SubReg) - .addReg(TmpReg) + .addReg(TmpReg, RegState::Kill) .addImm(0) .addReg(MI->getOperand(0).getReg(), RegState::ImplicitDefine); } |

