This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Set the kill flag on temp VGPRs used to restore SGPRs from scratch
ClosedPublic

Authored by tstellarAMD on Apr 29 2016, 2:04 PM.

Details

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.

Diff Detail

Event Timeline

tstellarAMD retitled this revision from to AMDGPU/SI: Set the kill flag on temp VGPRs used to restore SGPRs from scratch.
tstellarAMD updated this object.
tstellarAMD added a reviewer: arsenm.
tstellarAMD added a subscriber: llvm-commits.
arsenm accepted this revision.Apr 29 2016, 2:11 PM
arsenm edited edge metadata.

LGTM

This revision is now accepted and ready to land.Apr 29 2016, 2:11 PM
This revision was automatically updated to reflect the committed changes.