Skip to content

Commit 2908072

Browse files
committed
[AMDGPU] Clarify amdgpu.cs.chain + init whole wave. NFC
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 4f3bf1c commit 2908072

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
@@ -1701,7 +1701,10 @@ The AMDGPU backend supports the following calling conventions:
17011701

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

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

0 commit comments

Comments
 (0)