[PATCH] D80033: [AMDGPU] Fix wait counts in the presence of 16bit subregisters

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 16 01:32:28 PDT 2020


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:508
   unsigned Size = TRI->getRegSizeInBits(*RC);
-  Result.second = Result.first + (Size / 32);
+  Result.second = Result.first + ((Size + 16) / 32);
 
----------------
foad wrote:
> I think there's a DivCeil function in MathExtras that you could use here.
Please don't. This function does not work. I had to ditch it the other day specifically because of 16 vs 32 bits.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80033





More information about the llvm-commits mailing list