From c62e5ef82e1f88d9bcd156001dfe1b5e3dd691d8 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 29 Mar 2023 17:59:15 +0200 Subject: [PATCH] aco/ra: don't reallocate VOP3 instruction for non-vcc lane mask This would need to copy opsel soon but we can just reuse the old instruction. Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 7ffbf931071..8c6a6a790a2 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -3120,12 +3120,7 @@ register_allocation(Program* program, std::vector& live_out_per_block, ra } /* change the instruction to VOP3 to enable an arbitrary register pair as dst */ - aco_ptr tmp = std::move(instr); - Format format = asVOP3(tmp->format); - instr.reset(create_instruction( - tmp->opcode, format, tmp->operands.size(), tmp->definitions.size())); - std::copy(tmp->operands.begin(), tmp->operands.end(), instr->operands.begin()); - std::copy(tmp->definitions.begin(), tmp->definitions.end(), instr->definitions.begin()); + instr->format = asVOP3(instr->format); } instructions.emplace_back(std::move(*instr_it));