This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Refactor MIMG tables to better handle hardware variants
ClosedPublic

Authored by critson on Feb 8 2021, 5:56 PM.

Details

Summary

Add mimgopc object to represent the opcode allowing different
opcodes for different hardware variants.
This enables image_atomic_fcmpswap, image_atomic_fmin, and
image_atomic_fmax on GFX10

Diff Detail

Event Timeline

critson created this revision.Feb 8 2021, 5:56 PM
critson requested review of this revision.Feb 8 2021, 5:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2021, 5:56 PM
foad added a comment.Feb 9 2021, 2:02 AM

Looks good to me, but there are also some TODOs in test/MC/Disassembler/AMDGPU/gfx10_mimg.txt which you should be able TO DO now.

llvm/lib/Target/AMDGPU/MIMGInstructions.td
835

Needs asm/dis tests?

This revision is now accepted and ready to land.Feb 9 2021, 10:40 AM
critson marked an inline comment as done.Feb 9 2021, 7:55 PM
critson added inline comments.
llvm/lib/Target/AMDGPU/MIMGInstructions.td
835

I have added asm tests.
There are no disassembly tests for GFX7, and I do not think this is the right time to add them.

critson updated this revision to Diff 322575.Feb 9 2021, 7:55 PM
critson marked an inline comment as done.
  • Implement test/MC/Disassembler/AMDGPU/gfx10_mimg.txt TODOs
  • Add GFX7 asm tests for image_atomic_rsub
foad accepted this revision.Feb 10 2021, 3:08 AM
foad added inline comments.
llvm/lib/Target/AMDGPU/MIMGInstructions.td
835

Sure. You would have to add a gfx7 disassembler first :)

rampitec accepted this revision.Feb 10 2021, 9:46 AM
This revision was landed with ongoing or failed builds.Feb 10 2021, 8:23 PM
This revision was automatically updated to reflect the committed changes.