[llvm] [AMDGPU] Don't form sext/abs/neg fp8 cvt (PR #83843)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 07:26:47 PST 2024
================
@@ -4707,6 +4707,20 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
}
}
+ if (Opcode == AMDGPU::V_CVT_F32_FP8_sdwa ||
+ Opcode == AMDGPU::V_CVT_F32_BF8_sdwa ||
+ Opcode == AMDGPU::V_CVT_PK_F32_FP8_sdwa ||
+ Opcode == AMDGPU::V_CVT_PK_F32_BF8_sdwa) {
+ const MachineOperand *Src0ModsMO =
+ getNamedOperand(MI, AMDGPU::OpName::src0_modifiers);
+ unsigned Mods = Src0ModsMO->getImm();
+ if (Mods & SISrcMods::ABS || Mods & SISrcMods::NEG ||
+ Mods & SISrcMods::SEXT) {
+ ErrInfo = "sext, abs and neg are not allowed on this instruction";
----------------
arsenm wrote:
Missing verifier test
https://github.com/llvm/llvm-project/pull/83843
More information about the llvm-commits
mailing list