[llvm] [AMDGPU] Use subtarget call to determine number of VGPRs (PR #157927)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 20:09:03 PDT 2025
================
@@ -3452,7 +3452,7 @@ bool SITargetLowering::CanLowerReturn(
// We must use the stack if return would require unavailable registers.
unsigned MaxNumVGPRs = Subtarget->getMaxNumVGPRs(MF);
- unsigned TotalNumVGPRs = AMDGPU::VGPR_32RegClass.getNumRegs();
+ unsigned TotalNumVGPRs = Subtarget->getAddressableNumArchVGPRs();
----------------
arsenm wrote:
This use is curious, we should only be looking at the number of registers used for return in the calling convention
https://github.com/llvm/llvm-project/pull/157927
More information about the llvm-commits
mailing list