[PATCH] D157624: [AMDGPU] Treat KIMM32 and KIMM16 operand types as noninlinable

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 08:08:27 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:7823-7824
+      if (!Op.isReg() && !isInlineConstant(Op, OpInfo) &&
+          OpInfo.OperandType != AMDGPU::OPERAND_KIMM16 &&
+          OpInfo.OperandType != AMDGPU::OPERAND_KIMM32) {
         HasLiteral = true;
----------------
mbrkusanin wrote:
> arsenm wrote:
> > this part is redundant?
> No, because size of fmamk and fmaak (instructions that use kimm32 and kimm16 operands) is already 8 so we do not need to add extra 4 bytes for these literals.
Then that should be covered by !isInlineConstant.

The API made more sense before when it was only checking for explicitly encoded src operands. This shouldn't require special casing here, something is wrong with the operand definitions if it does


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157624/new/

https://reviews.llvm.org/D157624



More information about the llvm-commits mailing list