From edfba93f4c6bd64c5311ba06129664ae09fdedab Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Thu, 8 May 2025 16:42:44 +0200 Subject: [PATCH] aco/optimizer: apply f2f32 without label_usedef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This means we apply it to instructions where an omod label removed label_usedef. Foz-DB Navi21: Totals from 52 (0.07% of 79789) affected shaders: Instrs: 144945 -> 144304 (-0.44%); split: -0.45%, +0.01% CodeSize: 835956 -> 833992 (-0.23%); split: -0.30%, +0.06% Latency: 2850900 -> 2850018 (-0.03%); split: -0.05%, +0.02% InvThroughput: 1299486 -> 1299116 (-0.03%); split: -0.05%, +0.02% Copies: 29638 -> 29803 (+0.56%); split: -0.16%, +0.71% VALU: 94971 -> 94329 (-0.68%); split: -0.69%, +0.01% SALU: 29272 -> 29274 (+0.01%) Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_optimizer.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index e6fbba97415..53a02739500 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -1885,7 +1885,6 @@ label_instruction(opt_ctx& ctx, aco_ptr& instr) case aco_opcode::v_max_i16: case aco_opcode::v_max_u16_e64: case aco_opcode::v_max_i16_e64: - case aco_opcode::v_cvt_f32_f16: case aco_opcode::v_mov_b32: case aco_opcode::v_mul_lo_u16: case aco_opcode::v_mul_lo_u16_e64: @@ -3695,8 +3694,6 @@ combine_mad_mix(opt_ctx& ctx, aco_ptr& instr) if (!instr->operands[i].isTemp()) continue; Temp tmp = instr->operands[i].getTemp(); - if (!ctx.info[tmp.id()].is_usedef()) - continue; Instruction* conv = ctx.info[tmp.id()].parent_instr; if (conv->opcode != aco_opcode::v_cvt_f32_f16 || !conv->operands[0].isTemp() ||