[PATCH] D84194: [AMDGPU] Correct the number of SGPR blocks used for GFX9

Ronak Chauhan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 11:59:26 PDT 2020


rochauha marked 3 inline comments as done.
rochauha added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:435-437
   NumSGPRs = alignTo(std::max(1u, NumSGPRs), getSGPREncodingGranule(STI));
   // SGPRBlocks is actual number of SGPR blocks minus 1.
+  unsigned NumSGPRBlocks = NumSGPRs / getSGPREncodingGranule(STI) - 1;
----------------
foad wrote:
> Incidentally the alignTo and the division could be combined into a single call to divideCeil.
Done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84194





More information about the llvm-commits mailing list