aco/optimizer: create fma without label_usedef

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 <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
This commit is contained in:
Georg Lehmann
2025-05-09 11:34:49 +02:00
committed by Marge Bot
parent 177c98f95a
commit ffe11c0235
+1 -1
View File
@@ -3942,7 +3942,7 @@ combine_instruction(opt_ctx& ctx, aco_ptr<Instruction>& 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))