[AMDGPU] Fix global isel for kernels using agprs on gfx90a
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Wed, 27 Oct 2021 18:40:33 +0000 (11:40 -0700)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 29 Oct 2021 21:23:14 +0000 (14:23 -0700)
commite5340ed30ce6149ebffcd808e024da9daee2c98c
tree6e1d732402ef450f5769bf0e7109db012ad1ea94
parent044d5b5dd184ebdf20bcdfc62fa4bc7f1efd047c
[AMDGPU] Fix global isel for kernels using agprs on gfx90a

With Global ISel getReservedRegs() is called before function is
regbank selected for the first time. Defer caching of usesAGPRs()
in this case.

Differential Revision: https://reviews.llvm.org/D112644
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.mfma.gfx90a.ll [new file with mode: 0644]