diff options
author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2025-09-11 00:39:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-11 00:39:56 -0700 |
commit | d267fac3bcd35d726e45ebfa7b716ef9832e254f (patch) | |
tree | cbf662bb3e1af2af30f30e649c9794978410ae8f /llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | |
parent | 859e8a6d6b70805074867c01d1bea983256b8d76 (diff) | |
download | llvm-d267fac3bcd35d726e45ebfa7b716ef9832e254f.zip llvm-d267fac3bcd35d726e45ebfa7b716ef9832e254f.tar.gz llvm-d267fac3bcd35d726e45ebfa7b716ef9832e254f.tar.bz2 |
[AMDGPU] Use subtarget call to determine number of VGPRs (#157927)
Since the register file was increased that is no longer valid to
call VGPR_32RegClass.getNumregs() to get a total number of arch
registers available on a subtarget.
Fixes: SWDEV-550425
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp index 8a11203..54426d3 100644 --- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp +++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp @@ -86,7 +86,7 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const Function &F, // FIXME: MayNeedAGPRs is a misnomer for how this is used. MFMA selection // should be separated from availability of AGPRs if (MFMAVGPRForm || - (ST.getMaxNumVGPRs(F) <= AMDGPU::VGPR_32RegClass.getNumRegs() && + (ST.getMaxNumVGPRs(F) <= ST.getAddressableNumArchVGPRs() && !mayUseAGPRs(F))) MayNeedAGPRs = false; // We will select all MAI with VGPR operands. } |