This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Add decoding in the GFX80_UNPACKED decoding namespace.
ClosedPublic

Authored by cfang on Jan 26 2018, 12:16 PM.

Details

Summary

In developing d16 support for buffer and image instructions, we introduced GFX80_UNPACKED decoder namespace.
Thus we need to add the decoding of instructions in this new namespace.

Diff Detail

Repository
rL LLVM

Event Timeline

cfang created this revision.Jan 26 2018, 12:16 PM

Can this be tested?

cfang added a comment.Jan 26 2018, 1:44 PM

Can this be tested?

We have encoding test in MC. Can anyone suggest whether there should be any decoding tests in LIT? Thanks.

dp added a comment.Jan 29 2018, 4:34 AM

It would be nice to have a few decoding tests as there is currently zero _d16 coverage for disassembler.

BTW, there is no difference in data size for affected MIMG instructions. Currently data size in dwords = count_population(dmask) + tfe. How does d16 affect this number?

I was unable to find anything helpful in docs and SP3 output is not affected by d16 for gfx9. Are data in VGPRs really packed for MIMG? :-)

cfang updated this revision to Diff 131835.Jan 29 2018, 11:50 AM

Add Disassembler tests based on Reviewers' suggestion. Thanks.

In D42596#990403, @dp wrote:

It would be nice to have a few decoding tests as there is currently zero _d16 coverage for disassembler.

BTW, there is no difference in data size for affected MIMG instructions. Currently data size in dwords = count_population(dmask) + tfe. How does d16 affect this number?

I was unable to find anything helpful in docs and SP3 output is not affected by d16 for gfx9. Are data in VGPRs really packed for MIMG? :-)

For MIMG, to determine the data size for d16, we need to know whether the target has the feature UnpackedD16VMem (gfx8.0),

  1. if that feature is set, the data size is the same as without D16 bit set;
  2. if that feature is not set, then the data size is "half" of the size because we can packed two f16 into one register.
dp accepted this revision.Jan 30 2018, 3:07 AM

Looks fine, thanks!

This revision is now accepted and ready to land.Jan 30 2018, 3:07 AM
This revision was automatically updated to reflect the committed changes.