This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Have a subtarget feature to control use of real True16 instructions.
ClosedPublic

Authored by kosarev on Jul 24 2023, 3:57 AM.

Details

Summary

Real True16 instructions are as they are defined in the ISA. Fake True16
instructions are identical to real ones except that they take 32-bit
registers as operands and always use their low halves.

Diff Detail

Event Timeline

kosarev created this revision.Jul 24 2023, 3:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 3:57 AM
kosarev requested review of this revision.Jul 24 2023, 3:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 3:57 AM
arsenm added inline comments.Jul 24 2023, 6:06 AM
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
174

Can implement this by just clearing the hasTrue16BitInsts feature in the constructor

174

Actually just using -mattr=-true16-whatever should work just as well. Do we really need a dedicated flag?

kosarev updated this revision to Diff 543643.Jul 24 2023, 10:59 AM

Rework the command-line option into a SubtargetFeature.

kosarev added inline comments.Jul 24 2023, 11:01 AM
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
174

Done. HasTrue16BitInsts should stay raised for the existing tests to pass.

kosarev updated this revision to Diff 543651.Jul 24 2023, 11:09 AM

Update the commit message.

kosarev retitled this revision from [AMDGPU] Have a command-line flag to enable true True16 codegen. to [AMDGPU] Have a subtarget feature to enable true True16 codegen..Jul 24 2023, 11:10 AM
kosarev updated this revision to Diff 545972.Aug 1 2023, 2:18 AM

Rename the feature to reflect the fact that it's not just about codegen
anymore, but also assembling and disassembling.

kosarev retitled this revision from [AMDGPU] Have a subtarget feature to enable true True16 codegen. to [AMDGPU] Have a subtarget feature to control use of real True16 instructions..Aug 1 2023, 2:21 AM
kosarev edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Aug 17 2023, 11:35 AM