This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Assembler: Custom converters for SDWA instructions. Support for _dpp and _sdwa suffixes in mnemonics.
ClosedPublic

Authored by SamWot on May 25 2016, 8:17 AM.

Details

Summary

Added custom converters for SDWA instruction to support optional operands and modifiers.
Support for _dpp and _sdwa suffixes that allows to force DPP or SDWA encoding for instructions.

Diff Detail

Event Timeline

SamWot updated this revision to Diff 58427.May 25 2016, 8:17 AM
SamWot retitled this revision from to [AMDGPU] Assembler: Custom converters for SDWA instructions. Support for _dpp and _sdwa suffixes in mnemonics..
SamWot updated this object.
SamWot added reviewers: vpykhtin, artem.tamazov.
arsenm added inline comments.May 25 2016, 8:01 PM
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
632

Should take StringRef and return new StringRef

2554

enum not necessary

2676–2681

Can you move around the IsVOP1 check to avoid having IsVOP1 and !IsVOP1 conditions

SamWot updated this revision to Diff 58583.May 26 2016, 3:00 AM
SamWot edited edge metadata.

Changes for arsenm review

artem.tamazov accepted this revision.May 26 2016, 5:13 AM
artem.tamazov edited edge metadata.

Minor fixes required, otherwise fine.

test/MC/AMDGPU/vop_sdwa.s
14–52

Normally we put CHECK-lines *after* source lines.

This revision is now accepted and ready to land.May 26 2016, 5:13 AM
SamWot marked 3 inline comments as done.May 26 2016, 5:42 AM
SamWot added inline comments.
test/MC/AMDGPU/vop_sdwa.s
14–52

In all disassembler tests CHECK-lines are before source lines. Same for some assembler tests (vop1.s, vop2.s).

Matt,
Are there any more issues?

This revision was automatically updated to reflect the committed changes.