[PATCH] D139101: [AMDGPU][NFC] Isolate KImm operands

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 04:45:31 PST 2022


dp created this revision.
Herald added subscribers: kosarev, foad, 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.

`KImm` operands are (almost) always require special handling.

This patch separates `OPERAND_KIMM32` and `OPERAND_KIMM16` from other operand kinds. In particular, these operands are excluded from `[OPERAND_REG_INLINE_C_FIRST,OPERAND_REG_INLINE_C_LAST]` and from `[OPERAND_SRC_FIRST,OPERAND_SRC_LAST]`.
`opCanUseInlineConstant`, `isSISrcOperand` and `isSISrcInlinableOperand` now return false for `KImm` operands.


https://reviews.llvm.org/D139101

Files:
  llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
  llvm/lib/Target/AMDGPU/SIDefines.h
  llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139101.479231.patch
Type: text/x-patch
Size: 4279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221201/fb014b2a/attachment.bin>


More information about the llvm-commits mailing list