From: Rhys Perry Date: Wed, 4 Dec 2019 19:28:43 +0000 (+0000) Subject: aco: don't move literal to reg when making an instruction VOP3 on GFX10 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9405ceb8a73a1dda1ea00619d86427bd62b020c;p=mesa.git aco: don't move literal to reg when making an instruction VOP3 on GFX10 pipeline-db (Navi): Totals from affected shaders: SGPRS: 163398 -> 163398 (0.00 %) VGPRS: 143820 -> 143820 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 13065744 -> 13044308 (-0.16 %) bytes Max Waves: 18921 -> 18921 (0.00 %) Instructions: 2514644 -> 2509285 (-0.21 %) Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index dd414205eef..a137a952d43 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1792,7 +1792,7 @@ void register_allocation(Program *program, std::vector> live_out_ if (instr_needs_vop3) { /* if the first operand is a literal, we have to move it to a reg */ - if (instr->operands.size() && instr->operands[0].isLiteral()) { + if (instr->operands.size() && instr->operands[0].isLiteral() && program->chip_class < GFX10) { bool can_sgpr = true; /* check, if we have to move to vgpr */ for (const Operand& op : instr->operands) {