From a05dd58309caf7e3857eb7f02084d8c9667c9efc Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 8 Dec 2022 19:32:25 +0000 Subject: [PATCH] aco/ra: don't swap p_create_vector operand with definition blocker for scc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SCC is 1-bit, and we can't copy a 32-bit value into it. Fixes dEQP-VK.spirv_assembly.type.scalar.i32.iequal_tesse with ACO_DEBUG=noopt. No fossil-db changes. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Fixes: 9476986e6f6 ("aco/ra: special-case get_reg_for_create_vector_copy()") Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 4ffc4efe876..55df26cf696 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1095,7 +1095,7 @@ get_reg_for_create_vector_copy(ra_ctx& ctx, RegisterFile& reg_file, assignment& op = ctx.assignments[instr->operands[i].tempId()]; /* if everything matches, create parallelcopy for the killed operand */ if (!intersects(def_reg, PhysRegInterval{op.reg, op.rc.size()}) && - reg_file.get_id(op.reg) == instr->operands[i].tempId()) { + op.reg != scc && reg_file.get_id(op.reg) == instr->operands[i].tempId()) { Definition pc_def = Definition(reg, info.rc); parallelcopies.emplace_back(instr->operands[i], pc_def); return op.reg;