From 90811554da8afca7099abe7c7c66e6b1c009e16f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 2 Apr 2020 18:07:22 +0100 Subject: [PATCH] aco: remove unnecessary reg_file.fill() operation in get_reg_create_vector() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit No pipelinedb changes Reviewed-by: Rhys Perry Reviewed-By: Timur Kristóf Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 9dad4291347..5f2be2aa3dc 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -837,12 +837,11 @@ PhysReg get_reg_create_vector(ra_ctx& ctx, /* move killed operands which aren't yet at the correct position */ for (unsigned i = 0, offset = 0; i < instr->operands.size(); offset += instr->operands[i].size(), i++) { - if (instr->operands[i].isTemp() && instr->operands[i].isFirstKillBeforeDef() && instr->operands[i].getTemp().type() == rc.type()) { - if (instr->operands[i].physReg() != best_pos + offset) - vars.emplace(instr->operands[i].size(), instr->operands[i].tempId()); - else - reg_file.fill(instr->operands[i]); - } + if (instr->operands[i].isTemp() && + instr->operands[i].isFirstKillBeforeDef() && + instr->operands[i].getTemp().type() == rc.type() && + instr->operands[i].physReg() != best_pos + offset) + vars.emplace(instr->operands[i].size(), instr->operands[i].tempId()); } ASSERTED bool success = false; -- 2.30.2