From ffe11c0235e3ad4c31ecfb6cec58986a0e740654 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Fri, 9 May 2025 11:34:49 +0200 Subject: [PATCH] aco/optimizer: create fma without label_usedef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Foz-DB GFX1201: Totals from 1 (0.00% of 79789) affected shaders: Instrs: 1492 -> 1485 (-0.47%) CodeSize: 7436 -> 7384 (-0.70%) Latency: 2738 -> 2743 (+0.18%) InvThroughput: 364 -> 365 (+0.27%) SClause: 50 -> 56 (+12.00%) Copies: 101 -> 100 (-0.99%) PreSGPRs: 32 -> 31 (-3.12%) VALU: 700 -> 701 (+0.14%) SALU: 351 -> 350 (-0.28%) Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_optimizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index c8d325ea512..07dbb611536 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -3942,7 +3942,7 @@ combine_instruction(opt_ctx& ctx, aco_ptr& instr) bool emit_fma = false; /* find the 'best' mul instruction to combine with the add */ for (unsigned i = is_add_mix ? 1 : 0; i < instr->operands.size(); i++) { - if (!instr->operands[i].isTemp() || !ctx.info[instr->operands[i].tempId()].is_usedef()) + if (!instr->operands[i].isTemp()) continue; ssa_info& info = ctx.info[instr->operands[i].tempId()]; if (!is_mul(info.parent_instr))