diff --git a/src/amd/compiler/aco_ir.cpp b/src/amd/compiler/aco_ir.cpp index 8aab589a458..5f6eb5c177d 100644 --- a/src/amd/compiler/aco_ir.cpp +++ b/src/amd/compiler/aco_ir.cpp @@ -228,11 +228,18 @@ bool can_use_SDWA(chip_class chip, const aco_ptr& instr) } } + if (!instr->definitions.empty() && instr->definitions[0].bytes() > 4) + return false; + if (!instr->operands.empty()) { if (instr->operands[0].isLiteral()) return false; if (chip < GFX9 && !instr->operands[0].isOfType(RegType::vgpr)) return false; + if (instr->operands[0].bytes() > 4) + return false; + if (instr->operands.size() > 1 && instr->operands[1].bytes() > 4) + return false; } bool is_mac = instr->opcode == aco_opcode::v_mac_f32 ||