From 208d8cd7151c49ba9e8a476d584adc633d06d0d5 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Fri, 27 Dec 2024 21:33:15 +0100 Subject: [PATCH] radv: run peephole_select in optimize_nir_algebraic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Foz-DB Navi21: Totals from 451 (0.57% of 79395) affected shaders: MaxWaves: 8680 -> 8616 (-0.74%) Instrs: 689610 -> 688225 (-0.20%); split: -0.21%, +0.01% CodeSize: 3524580 -> 3521740 (-0.08%); split: -0.11%, +0.03% VGPRs: 28512 -> 28584 (+0.25%) Latency: 1906219 -> 1892124 (-0.74%); split: -0.91%, +0.17% InvThroughput: 481931 -> 483570 (+0.34%); split: -0.00%, +0.34% VClause: 10317 -> 10296 (-0.20%) SClause: 18105 -> 18088 (-0.09%); split: -0.17%, +0.07% Copies: 69532 -> 67579 (-2.81%); split: -2.85%, +0.04% Branches: 21353 -> 20501 (-3.99%) PreSGPRs: 27004 -> 27005 (+0.00%) VALU: 436235 -> 436334 (+0.02%); split: -0.01%, +0.03% SALU: 102349 -> 101944 (-0.40%); split: -0.61%, +0.21% Reviewed-by: Timur Kristóf Part-of: --- src/amd/vulkan/radv_shader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index c933a00cdc6..b94bec51e5d 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -218,6 +218,7 @@ radv_optimize_nir_algebraic(nir_shader *nir, bool opt_offsets, bool opt_mqsad) NIR_PASS(_, nir, nir_opt_dce); NIR_PASS(_, nir, nir_opt_constant_folding); NIR_PASS(_, nir, nir_opt_cse); + NIR_PASS(_, nir, nir_opt_peephole_select, 3, true, true); NIR_PASS(more_algebraic, nir, nir_opt_algebraic); NIR_PASS(_, nir, nir_opt_generate_bfi); NIR_PASS(_, nir, nir_opt_remove_phis);