This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Activate all lanes when spilling CSR VGPR for SGPR spills
ClosedPublic

Authored by arsenm on May 23 2019, 4:55 PM.

Details

Reviewers
rampitec
Summary

If some lanes weren't active on entry to the function, this could
clobber their VGPR values.

Diff Detail

Event Timeline

arsenm created this revision.May 23 2019, 4:55 PM

Where do you get SGPR pair for saveexec if you need to spill an SGPR?

Where do you get SGPR pair for saveexec if you need to spill an SGPR?

LivePhysRegs takes care of this. Since this is the prologue/epilog, only the ABI registers should be live so it should be easy to find a free register. This will probably require special handling for one of the odd preserve all calling conventions that aren't supported now

Where do you get SGPR pair for saveexec if you need to spill an SGPR?

LivePhysRegs takes care of this. Since this is the prologue/epilog, only the ABI registers should be live so it should be easy to find a free register. This will probably require special handling for one of the odd preserve all calling conventions that aren't supported now

To answer your question more directly, spilling should never be necessary here

This revision is now accepted and ready to land.May 24 2019, 10:47 AM
arsenm closed this revision.May 24 2019, 11:16 AM

r361655