This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Account for VData size increase from tfe bit for image instructions
AbandonedPublic

Authored by mbrkusanin on Jul 29 2022, 5:30 AM.

Details

Reviewers
foad
arsenm
Summary

TFE bit effectively increases size of VData by 32bit so we need _V* variants in
tablegen to account for that.

Note that this change for cmpswap also renames _V1_V*_ into _V2_V*_ and _V2_V*_
into _V4_V*_ for VReg_64 and VReg_128 respectively.

Diff Detail

Event Timeline

mbrkusanin created this revision.Jul 29 2022, 5:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2022, 5:30 AM
mbrkusanin requested review of this revision.Jul 29 2022, 5:30 AM

Does TFE actually work for atomics? Do we not have any IR tests for TFE?

llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt
194

Why did this get an additional output register if it's not using TFE?

mbrkusanin added inline comments.Jul 29 2022, 5:46 AM
llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt
194

It is one of examples with wrong encoding for dmask. Since dmask has 3 bits enabled it will chose vgpr96. Only valid masks are 0x1 and 0x3. It does not seem to me it's worth to update disassembler for this.

arsenm accepted this revision.Jul 29 2022, 5:55 AM
This revision is now accepted and ready to land.Jul 29 2022, 5:55 AM
mbrkusanin abandoned this revision.Jul 29 2022, 6:12 AM

I could not find the clear answer in the docs. But looking at .ll tests it does not seems like it is used. So tfe is probably not supported for atomics or gather4.

I could not find the clear answer in the docs. But looking at .ll tests it does not seems like it is used. So tfe is probably not supported for atomics or gather4.

If I were to guess it's something that works by default but isn't actually tested