aco: fix validation of SOP1 instructions without definitions

Like s_setpc_b64.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17082>
This commit is contained in:
Samuel Pitoiset
2022-06-16 14:49:24 +02:00
committed by Marge Bot
parent 6dd2699e9f
commit 5485bf7b1b

View File

@@ -379,8 +379,9 @@ validate_ir(Program* program)
}
if (instr->isSOP1() || instr->isSOP2()) {
check(instr->definitions[0].getTemp().type() == RegType::sgpr,
"Wrong Definition type for SALU instruction", instr.get());
if (!instr->definitions.empty())
check(instr->definitions[0].getTemp().type() == RegType::sgpr,
"Wrong Definition type for SALU instruction", instr.get());
for (const Operand& op : instr->operands) {
check(op.isConstant() || op.regClass().type() <= RegType::sgpr,
"Wrong Operand type for SALU instruction", instr.get());