[PATCH] D157624: [AMDGPU] Treat KIMM32 and KIMM16 operand types as noninlinable
Joe Nash via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 08:16:20 PDT 2023
Joe_Nash 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;
----------------
arsenm wrote:
> 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
The KIMM are not inline constants and they are not true Literals either. There needs to be a special case somewhere. I think it is better to have a special case here than spread over everywhere we have to handle literals.
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