From b1b3237590b15f34a7a66727c4741f89f2cda88c Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 21 May 2024 11:55:22 +0100 Subject: [PATCH] aco/gfx12: remove MIMG vector affinity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since GFX12 uses NSA unconditionally, there is no code size advantage to avoiding it. fossil-db (gfx1200): Totals from 41700 (52.52% of 79395) affected shaders: MaxWaves: 1063633 -> 1063623 (-0.00%); split: +0.00%, -0.00% Instrs: 32745913 -> 32736332 (-0.03%); split: -0.10%, +0.07% CodeSize: 177664256 -> 177623280 (-0.02%); split: -0.08%, +0.06% VGPRs: 1668640 -> 1665280 (-0.20%); split: -0.26%, +0.06% Latency: 248630176 -> 248803989 (+0.07%); split: -0.23%, +0.30% InvThroughput: 51923793 -> 51958560 (+0.07%); split: -0.15%, +0.22% VClause: 633381 -> 633594 (+0.03%); split: -0.31%, +0.34% SClause: 1090207 -> 1090206 (-0.00%); split: -0.02%, +0.02% Copies: 2042437 -> 2040188 (-0.11%); split: -0.53%, +0.42% Branches: 680437 -> 680416 (-0.00%); split: -0.01%, +0.01% VALU: 19387160 -> 19384917 (-0.01%); split: -0.06%, +0.04% SALU: 3112590 -> 3112540 (-0.00%); split: -0.01%, +0.00% VOPD: 5474 -> 5527 (+0.97%); split: +2.87%, -1.90% Signed-off-by: Rhys Perry Reviewed-by: Georg Lehmann Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index ddcdb3f5bae..ca671ec39a7 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -2573,7 +2573,7 @@ get_affinities(ra_ctx& ctx, std::vector& live_out_per_block) ctx.vectors[op.tempId()] = instr.get(); } } else if (instr->format == Format::MIMG && instr->operands.size() > 4 && - !instr->mimg().strict_wqm) { + !instr->mimg().strict_wqm && ctx.program->gfx_level < GFX12) { for (unsigned i = 3; i < instr->operands.size(); i++) ctx.vectors[instr->operands[i].tempId()] = instr.get(); } else if (instr->opcode == aco_opcode::p_split_vector &&