From: Rhys Perry Date: Thu, 20 Oct 2022 14:47:02 +0000 (+0100) Subject: aco/gfx11: optimize LS/HS load_local_invocation_index X-Git-Tag: upstream/22.3.5~1291 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfce4333854ecfba47cda99b256563e5ac27a2e7;p=platform%2Fupstream%2Fmesa.git aco/gfx11: optimize LS/HS load_local_invocation_index fossil-db (gfx1100): Totals from 1361 (1.01% of 135032) affected shaders: Instrs: 501227 -> 500469 (-0.15%); split: -0.16%, +0.01% CodeSize: 2730012 -> 2724820 (-0.19%); split: -0.20%, +0.00% VGPRs: 63716 -> 63688 (-0.04%) Latency: 2228848 -> 2228858 (+0.00%); split: -0.00%, +0.00% InvThroughput: 878418 -> 878275 (-0.02%); split: -0.02%, +0.00% VClause: 14866 -> 14868 (+0.01%); split: -0.03%, +0.04% SClause: 16674 -> 16645 (-0.17%); split: -0.22%, +0.05% Signed-off-by: Rhys Perry Reviewed-by: Georg Lehmann Part-of: --- diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index f2afe92..aa4ab7b 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -8448,9 +8448,7 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr) Temp temp = bld.sop2(aco_opcode::s_mul_i32, bld.def(s1), wave_id, Operand::c32(ctx->program->wave_size)); - Temp thread_id = emit_mbcnt(ctx, bld.tmp(v1)); - - bld.vadd32(Definition(get_ssa_temp(ctx, &instr->dest.ssa)), temp, thread_id); + emit_mbcnt(ctx, get_ssa_temp(ctx, &instr->dest.ssa), Operand(), Operand(temp)); } else { bld.copy(Definition(get_ssa_temp(ctx, &instr->dest.ssa)), get_arg(ctx, ctx->args->ac.vs_rel_patch_id));