[PATCH] D119911: AMDGPU: Always reserve VGPR for AGPR copies on gfx908

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 15:23:32 PST 2022


arsenm added a comment.

In D119911#3327699 <https://reviews.llvm.org/D119911#3327699>, @rampitec wrote:

> In D119911#3327691 <https://reviews.llvm.org/D119911#3327691>, @arsenm wrote:
>
>> In D119911#3326483 <https://reviews.llvm.org/D119911#3326483>, @rampitec wrote:
>>
>>> What will happen to a very small kernel which could use 24 vgprs or less? Will it still use 24 vgprs and have occupancy 10?
>>
>> No, it will still use v32. I haven't been able to construct a testcase where this would happen that can fit in so few registers
>
> A simple testcase is an empty kernel or a kernel loading and storing a single dword. Do you mean this will have v32 used?

No, I mean if you end up with an AGPR->AGPR copy in your tiny kernel, you would end up using v0-v24, and then jump to v32. We could try to be fancier by shifting the reserved register around, or raise the VGPR allocation if we know we need to reserve it. Either one is a separate patch with greater potential for breakage


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119911/new/

https://reviews.llvm.org/D119911



More information about the llvm-commits mailing list