From 41e82b8b8ee6c355bd9ea4a69e352535542e4ba5 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Sun, 15 Sep 2024 12:16:54 +0200 Subject: [PATCH] nir: sink is_subgroup_invocation_lt_amd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Having it closer to the branches means we can eliminate an exec copy. Foz-DB Navi31: Totals from 11615 (14.63% of 79395) affected shaders: Instrs: 6804372 -> 6804903 (+0.01%); split: -0.04%, +0.05% CodeSize: 33684672 -> 33680584 (-0.01%); split: -0.07%, +0.05% VGPRs: 578616 -> 578604 (-0.00%) SpillSGPRs: 1506 -> 1304 (-13.41%) Latency: 29817034 -> 29821320 (+0.01%); split: -0.03%, +0.05% InvThroughput: 3581587 -> 3581217 (-0.01%); split: -0.02%, +0.01% VClause: 124826 -> 124782 (-0.04%); split: -0.04%, +0.00% SClause: 187916 -> 187645 (-0.14%); split: -0.27%, +0.13% Copies: 520969 -> 510027 (-2.10%); split: -2.20%, +0.10% PreSGPRs: 442584 -> 421344 (-4.80%) VALU: 3810755 -> 3810267 (-0.01%); split: -0.01%, +0.00% SALU: 763402 -> 752650 (-1.41%); split: -1.48%, +0.07% Reviewed-by: Timur Kristóf Part-of: --- src/compiler/nir/nir_opt_sink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_sink.c b/src/compiler/nir/nir_opt_sink.c index f5619a47b88..f5e97b272f9 100644 --- a/src/compiler/nir/nir_opt_sink.c +++ b/src/compiler/nir/nir_opt_sink.c @@ -122,6 +122,7 @@ can_sink_instr(nir_instr *instr, nir_move_options options, bool *can_mov_out_of_ case nir_intrinsic_load_kernel_input: return options & nir_move_load_uniform; case nir_intrinsic_inverse_ballot: + case nir_intrinsic_is_subgroup_invocation_lt_amd: *can_mov_out_of_loop = false; return options & nir_move_copies; case nir_intrinsic_load_constant_agx: