From 99ca96fbf58975d49e4ad131f907c5b01e12db85 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 27 Apr 2020 20:28:41 +0100 Subject: [PATCH] aco: improve RA for uneven p_split_vector MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 42a4dcbcebf..e702e09059d 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1832,7 +1832,8 @@ void register_allocation(Program *program, std::vector& live_out_per_bl definition.setFixed(definition.physReg()); else if (instr->opcode == aco_opcode::p_split_vector) { PhysReg reg = instr->operands[0].physReg(); - reg.reg_b += i * definition.bytes(); + for (unsigned j = 0; j < i; j++) + reg.reg_b += instr->definitions[j].bytes(); if (get_reg_specified(ctx, register_file, definition.regClass(), parallelcopy, instr, reg)) definition.setFixed(reg); } else if (instr->opcode == aco_opcode::p_wqm) { -- 2.30.2