[PATCH] D117618: AMDGPU/GlobalISel: Fix flat_scratch_init handling for shaders

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 01:36:45 PST 2022


sebastian-ne added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp:505-509
   if (Info.hasFlatScratchInit()) {
     Register FlatScratchInitReg = Info.addFlatScratchInit(TRI);
     MF.addLiveIn(FlatScratchInitReg, &AMDGPU::SGPR_64RegClass);
     CCInfo.AllocateReg(FlatScratchInitReg);
   }
----------------
Isn’t this already handled here for HSA?
I didn’t hear of mesa using flat scratch (and we don’t have any flat-scratch+mesa test), so should we update the dag code instead? I wonder why we are calling `allocateHSAUserSGPRs` for non-HSA platforms in the SDAG.


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

https://reviews.llvm.org/D117618



More information about the llvm-commits mailing list