[llvm] Update amdgpu_gfx functions to use s0-s3 for inreg SGPR arguments on targets using scratch instructions for stack #78226 (PR #81394)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 05:31:24 PDT 2024
================
@@ -732,9 +728,14 @@ bool AMDGPUCallLowering::lowerFormalArguments(
uint64_t StackSize = Assigner.StackSize;
// Start adding system SGPRs.
- if (IsEntryFunc)
+ if (IsEntryFunc) {
TLI.allocateSystemSGPRs(CCInfo, MF, *Info, CC, IsGraphics);
-
+ } else {
+ if (!Subtarget.enableFlatScratch())
+ CCInfo.AllocateReg(Info->getScratchRSrcReg());
----------------
arsenm wrote:
This can't move down here. Previously, this was allocated before the user arguments. Now it's allocated after
https://github.com/llvm/llvm-project/pull/81394
More information about the llvm-commits
mailing list