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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 03:11:40 PDT 2020


foad 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);
 
----------------
rampitec wrote:
> 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.
> This function does not work.

???


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