This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC][GFX9] Enabled TBA/TMA access via setreg/getreg
AbandonedPublic

Authored by dp on Jan 25 2022, 3:31 AM.

Details

Reviewers
foad
Summary

TBA and TMA are not accessible as assembler registers in GFX9, but they should be available via s_getreg and s_setreg instructions.

Diff Detail

Event Timeline

dp created this revision.Jan 25 2022, 3:31 AM
dp requested review of this revision.Jan 25 2022, 3:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2022, 3:31 AM
foad added inline comments.Jan 25 2022, 3:41 AM
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
1036–1037

Did you mean to include this in this patch?

llvm/test/MC/AMDGPU/sopk.s
268

This is a strange example because TBA is read-only, but I guess the assembler does not know that. So OK.

dp added inline comments.Jan 25 2022, 5:23 AM
llvm/test/MC/AMDGPU/sopk.s
268

Yes, the tests are rather formal. The assembler does not currently validate such things.

foad added inline comments.Jan 25 2022, 5:34 AM
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
1036–1037

Oh, I see, adding the check for POPS_PACKER is NFC because the getLastSymbolicHwreg would exclude it for GFX9 and below anyway. I guess it is OK to leave it here for consistency if you prefer.

dp updated this revision to Diff 403994.Jan 28 2022, 6:03 AM

Removed unnecessary code.