[llvm] [AMDGPU][GFX12] VOP encoding and codegen - add support for v_cvt fp8/… (PR #78414)
Ivan Kosarev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 01:19:10 PST 2024
================
@@ -8273,6 +8276,16 @@ void AMDGPUAsmParser::cvtVOP3(MCInst &Inst, const OperandVector &Operands,
((AMDGPUOperand &)*Operands[I++]).addRegOperands(Inst, 1);
}
+ if (isVOP1Cvt_F32_Fp8_Bf8_e64(Opc) &&
+ Opc != AMDGPU::V_CVT_PK_F32_BF8_e64_gfx12 &&
+ Opc != AMDGPU::V_CVT_PK_F32_FP8_e64_gfx12) {
+ AMDGPUOperand &Op = ((AMDGPUOperand &)*Operands[I++]);
+ Op.addRegOrImmWithFPInputModsOperands(Inst, 1); // src0
+ // Add dummy src1
+ Inst.addOperand(MCOperand::createImm(0));
+ Inst.addOperand(MCOperand::createReg(AMDGPU::getMCReg(0, getSTI())));
----------------
kosarev wrote:
Probably no need to call `getMCReg()` for `NoRegister`?
Are these dummy operands really necessary? By having them, we just seem to give ourselves more work handling them with custom code. `NoRegister` register operands look a bit weird.
https://github.com/llvm/llvm-project/pull/78414
More information about the llvm-commits
mailing list