This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Don't use reserved VGPRs for SGPR spilling
ClosedPublic

Authored by tstellarAMD on Jul 5 2016, 9:23 PM.

Details

Summary

We were using reserved VGPRs for SGPR spilling and this was causing
some programs with a workgroup size of 1024 to use more than 64
registers, which is illegal.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellarAMD retitled this revision from to AMDGPU/SI: Don't use reserved VGPRs for SGPR spilling.
tstellarAMD updated this object.
tstellarAMD added reviewers: mareko, arsenm.
tstellarAMD added a subscriber: llvm-commits.
arsenm added inline comments.Jul 5 2016, 10:59 PM
lib/Target/AMDGPU/SIRegisterInfo.cpp
952–954 ↗(On Diff #62820)

Instead of testing getReservedRegs you should check MRI.isAllocatable

mareko edited edge metadata.Jul 19 2016, 5:42 AM

FYI, This is a high priority bug. It prevents DiRT Showdown from working. Phoronix can't test the game due to that.

tstellarAMD edited edge metadata.

Use MRI.isAllocatble()

nhaehnle accepted this revision.Jul 19 2016, 7:53 AM
nhaehnle added a reviewer: nhaehnle.
nhaehnle added a subscriber: nhaehnle.

LGTM except for one comment.

lib/Target/AMDGPU/SIRegisterInfo.cpp
965 ↗(On Diff #64486)

Reserved is unused now.

This revision is now accepted and ready to land.Jul 19 2016, 7:53 AM
This revision was automatically updated to reflect the committed changes.

I think this fixed the issue I was seeing running BioShock at Ultra settings at 4K resolutions on my M395X