This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC] Added validation of d16 and r128 modifiers of MIMG opcodes
ClosedPublic

Authored by dp on Jan 30 2018, 9:12 AM.

Details

Summary

r128 dropped in GFX9;
d16 is supported by GFX8/9 only.

See bugs 36094 and 36095:

https://bugs.llvm.org/show_bug.cgi?id=36094
https://bugs.llvm.org/show_bug.cgi?id=36095

Diff Detail

Repository
rL LLVM

Event Timeline

dp created this revision.Jan 30 2018, 9:12 AM
arsenm added inline comments.Jan 30 2018, 1:36 PM
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
2344 ↗(On Diff #131980)

I don't like this listing of generations. We should add a new r128 subtarget feature bit instead

dp updated this revision to Diff 132349.Feb 1 2018, 3:22 AM

Added R128 feature as suggested by Matt

artem.tamazov added inline comments.Feb 1 2018, 8:52 AM
lib/Target/AMDGPU/AMDGPU.td
35 ↗(On Diff #132349)

R128 seems too cryptic. For example, I would decode "R128" as "Support for register quads", which is of course wrong.

lib/Target/AMDGPU/AMDGPUSubtarget.h
142 ↗(On Diff #132349)

Ditto.

dp added inline comments.Feb 1 2018, 9:51 AM
lib/Target/AMDGPU/AMDGPU.td
35 ↗(On Diff #132349)

We may introduce a longer name, e.g. ShortTextureResource, but I think a reader with good knowledge of AMD GPU would be curious if the name stands for R128 and what is the difference.

arsenm added inline comments.Feb 1 2018, 10:12 AM
lib/Target/AMDGPU/AMDGPU.td
35 ↗(On Diff #132349)

I think mimg-r128 would be a good name.

dp updated this revision to Diff 132434.Feb 1 2018, 11:20 AM

Renamed R128 to MIMG_R128 as suggested by Atrem and Matt

dp updated this revision to Diff 132436.Feb 1 2018, 11:27 AM

Corrected a typo in feature name

arsenm added inline comments.Feb 1 2018, 1:48 PM
lib/Target/AMDGPU/AMDGPU.td
34 ↗(On Diff #132436)

Subtarget feature names should be all lowercase

dp updated this revision to Diff 132568.Feb 2 2018, 4:17 AM

Corrected subtarget feature name.

artem.tamazov accepted this revision.Feb 2 2018, 4:19 AM
This revision is now accepted and ready to land.Feb 2 2018, 4:19 AM
This revision was automatically updated to reflect the committed changes.