AMDGPURewriteAGPRCopyMFMA should handle ds_write2 instructions
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Currently this pass only handles converting MFMA instructions from the opcode that uses VGPRs for the result and src2 operands to the AGPR form. Really this should handle all instructions with data operands that can be AGPR or VGPR, but are paired with another operand. This also applies to the ds_write2_b32, ds_writest64_b32, ds_write2_b64, ds_writest64_b64, and image atomics. The image atomic cases are probably not useful in the real world, but the DS writes may be
Contributor guide
Research direction
Start by locating the AMDGPURewriteAGPRCopyMFMA pass and reading how it handles MFMA instructions that use VGPRs for result and src2 operands. Trace the paired-operand handling for ds_write2_b32, ds_writest64_b32, ds_write2_b64, ds_writest64_b64, and image atomics, then verify that the relevant AGPR/VGPR forms are covered.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100