[PATCH] D133606: [AMDGPU][MC] Add detection of hardcoded literals in parser

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 12:49:16 PDT 2022


dp created this revision.
dp added reviewers: Joe_Nash, foad.
Herald added subscribers: kosarev, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
Herald added a project: All.
dp requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

When asm parser detects an error, it attempts to show the location of an offending operand. Hardcoded literals like those used by `FMAAK/FMAMK` should be ignored, because they are part of the instruction and cannot be changed. This is how it currently works.

GFX11 VOPD is a special case because an instruction may have two hardcoded literals. And if they are different, the parser should show the location of a hardcoded literal.

This change is required for VOPD validation which is WIP.


https://reviews.llvm.org/D133606

Files:
  llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133606.459159.patch
Type: text/x-patch
Size: 4620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220909/94468d9b/attachment.bin>


More information about the llvm-commits mailing list