From 6ab6bc94d3e46975a7108e03fcfcb754cd6d7f60 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 23 Oct 2025 11:14:55 +0100 Subject: [PATCH] radv: do nir_opt_algebraic last in radv_optimize_nir_algebraic_early MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fossil-db (navi21): Totals from 15 (0.02% of 84369) affected shaders: Instrs: 88362 -> 88310 (-0.06%) CodeSize: 477056 -> 476804 (-0.05%) Latency: 1410938 -> 1402039 (-0.63%) InvThroughput: 704454 -> 700004 (-0.63%) Copies: 5034 -> 5024 (-0.20%); split: -0.40%, +0.20% PreSGPRs: 1014 -> 1010 (-0.39%) VALU: 66264 -> 66221 (-0.06%); split: -0.07%, +0.01% SALU: 10115 -> 10120 (+0.05%) Signed-off-by: Rhys Perry Reviewed-by: Timur Kristóf Part-of: --- src/amd/vulkan/radv_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 0d598e8a015..cff2321695c 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -266,10 +266,10 @@ radv_optimize_nir_algebraic_early(nir_shader *nir) NIR_PASS(progress, nir, nir_opt_peephole_select, &peephole_select_options); NIR_PASS(_, nir, nir_opt_undef); NIR_PASS(_, nir, nir_opt_phi_to_bool); - NIR_PASS(progress, nir, nir_opt_algebraic); NIR_PASS(_, nir, nir_opt_generate_bfi); NIR_PASS(progress, nir, nir_opt_remove_phis); NIR_PASS(progress, nir, nir_opt_dead_cf); + NIR_PASS(progress, nir, nir_opt_algebraic); if (!had_opt_fp_math_ctrl) { NIR_PASS(progress, nir, nir_opt_fp_math_ctrl);