LLVM AMDGPU assembler defines ds_read_addtid_b32 and ds_write_addtid_b32 as follows:
- they have 2 register operands (address + src/dst);
- they do not read M0.
An example:
ds_read_addtid_b32 v0, v1 offset:65535
This is different from how they are defined in SP3 assembler and how they are described in spec.
GFX9/10 Spec states explicitly that:
- "no part of the address comes from a VGPR";
- "M0 is used for: ds_read_addtid_b32, ds_write_addtid_b32".
See GFX10_shader_programming.pdf (pp 62-63).
This is in line with how SP3 assembler handles these opcodes. Here is an example of ds_read_addtid_b32 decoded by SP3 assembler:
ds_read_addtid_b32 v0 offset:65535