From 911fdce0b6a1ec7b0944034c7a231de68656afa3 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 25 Jul 2024 12:59:15 +0100 Subject: [PATCH] aco: fix validation of v_s_ opcodes Signed-off-by: Rhys Perry Reviewed-by: Georg Lehmann Fixes: 284b9965e820 ("aco/gfx11.5+: allow sgpr dst for trans ops and use pseudo scalar ops on gfx12") Part-of: --- src/amd/compiler/aco_validate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_validate.cpp b/src/amd/compiler/aco_validate.cpp index 40a90e32a2b..d7816ecc708 100644 --- a/src/amd/compiler/aco_validate.cpp +++ b/src/amd/compiler/aco_validate.cpp @@ -435,7 +435,9 @@ validate_ir(Program* program) if (instr->isVOPC() || instr->opcode == aco_opcode::v_readfirstlane_b32 || instr->opcode == aco_opcode::v_readlane_b32 || - instr->opcode == aco_opcode::v_readlane_b32_e64) { + instr->opcode == aco_opcode::v_readlane_b32_e64 || + instr_info.classes[(int)instr->opcode] == + instr_class::valu_pseudo_scalar_trans) { check(instr->definitions[0].regClass().type() == RegType::sgpr, "Wrong Definition type for VALU instruction", instr.get()); } else {