Skip to content

Commit 2aa6ced

Browse files
authored
[AMDGPU] Clarify amdgpu.cs.chain + init whole wave. NFC (#115452)
Add some docs clarifying how inactive lanes are handled in the amdgpu_cs_chain calling convention when the llvm.amdgcn.init.whole.wave intrinsic is used.
1 parent c1c68ba commit 2aa6ced

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/docs/AMDGPUUsage.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,10 @@ The AMDGPU backend supports the following calling conventions:
17071707

17081708
Values in scalar registers as well as v0-v7 are not preserved. Values in
17091709
VGPRs starting at v8 are not preserved for the active lanes, but must be
1710-
saved by the callee for inactive lanes when using WWM.
1710+
saved by the callee for inactive lanes when using WWM (a notable exception is
1711+
when the llvm.amdgcn.init.whole.wave intrinsic is used in the function - in this
1712+
case the backend assumes that there are no inactive lanes upon entry; any inactive
1713+
lanes that need to be preserved must be explicitly present in the IR).
17111714

17121715
Wave scratch is "empty" at function boundaries. There is no stack pointer input
17131716
or output value, but functions are free to use scratch starting from an initial

0 commit comments

Comments
 (0)