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 <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069>
This commit is contained in:
Georg Lehmann
2023-03-29 17:59:15 +02:00
committed by Marge Bot
parent 424825c6e5
commit c62e5ef82e
+1 -6
View File
@@ -3120,12 +3120,7 @@ register_allocation(Program* program, std::vector<IDSet>& live_out_per_block, ra
}
/* change the instruction to VOP3 to enable an arbitrary register pair as dst */
aco_ptr<Instruction> tmp = std::move(instr);
Format format = asVOP3(tmp->format);
instr.reset(create_instruction<VALU_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));