From 2c738559376950bb040c69cd869dcf2f81daa71f 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=utf8 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: (cherry picked from commit a05dd58309caf7e3857eb7f02084d8c9667c9efc) --- .pick_status.json | 2 +- src/amd/compiler/aco_register_allocation.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 2cb6b52..152c704 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1831,7 +1831,7 @@ "description": "aco/ra: don't swap p_create_vector operand with definition blocker for scc", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "9476986e6f6fe49ef8bc511f4ebeca4232263888" }, diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index eef4ff0..c59c635 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1091,7 +1091,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, true}; -- 2.7.4