This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC][GFX9][GFX10] Corrected number of src operands for ds_[read/write]_addtid_b32
ClosedPublic

Authored by dp on Oct 10 2019, 6:10 AM.

Details

Summary

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

See https://bugs.llvm.org/show_bug.cgi?id=37941

Diff Detail

Event Timeline

dp created this revision.Oct 10 2019, 6:10 AM
This revision is now accepted and ready to land.Oct 10 2019, 8:02 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2019, 7:55 AM