[PATCH] D138661: [AMDGPU][MC] Correct handling of mandatory literals

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 05:00:48 PST 2022


dp created this revision.
dp added reviewers: foad, Joe_Nash.
Herald added subscribers: kosarev, kerbowa, hiraditya, tpr, dstuttard, yaxunl, 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.

Mandatory literals are incorrectly handled by the parser.

When the value of a mandatory literal is in the range of inline constants, it is not accounted for as a literal. As a result, assembler may accept instructions with several different literals. See this bug <https://github.com/llvm/llvm-project/issues/59048> for more information.


https://reviews.llvm.org/D138661

Files:
  llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
  llvm/lib/Target/AMDGPU/SIDefines.h
  llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
  llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
  llvm/test/MC/AMDGPU/gfx10_asm_err.s
  llvm/test/MC/AMDGPU/gfx11_asm_vop2_err.s
  llvm/test/MC/AMDGPU/gfx11_asm_vopd_err.s
  llvm/test/MC/AMDGPU/literals.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138661.477743.patch
Type: text/x-patch
Size: 7738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221124/abdb65e6/attachment.bin>


More information about the llvm-commits mailing list