[PATCH] D123346: AMDGPU: Align the implicit kernel argument segment to 8 bytes for v5

Changpeng Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 14:05:48 PDT 2022


cfang marked an inline comment as done.
cfang added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp:804
 
+  Offset = alignTo(Offset, ST.getAlignmentForImplicitArgPtr());
+
----------------
arsenm wrote:
> This isn't the real alignment. You should assert the alignment you compute using the kernarg base alignment is at least getAlignmentForImplicitArgPtr
I think this is to align Offset to ST.getAlignmentForImplicitArgPtr which is 8 bytes.
Offset = alignTo(Offset, ST.getAlignmentForImplicitArgPtr());

We do need this alignment to be in sync with the actual load of the implicit kernel argument.


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

https://reviews.llvm.org/D123346



More information about the llvm-commits mailing list