[PATCH] D101830: AMDGPU: Correct const_index_stride for wave 32 for PAL API

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 4 05:56:22 PDT 2021


foad added a comment.

Needs a test case.



================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:551-553
+    // If we are in a wave32 shader we have to modify the const_index_stride to
+    // b10 We can't rely on the driver setting this for us since there are often
+    // multiple shaders with different wave sizes
----------------
The comment could be a bit more helpful. As I understand it: index_stride is a 2-bit field in bits 118:117 of the descriptor, so bits 22:21 of this word. (Is this the same for all architectures?) The value coming in might be either 0b10 (stride=32) or 0b11 (stride=64) so we force it to 0b10 by clearing bit 21.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101830



More information about the llvm-commits mailing list