From a7f8c6ed605e9f011088215c4385e59e1fdba3ed Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 24 Sep 2025 20:03:57 +0200 Subject: [PATCH] radv: call nir_opt_undef late too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Foz-DB GFX1201: Totals from 2263 (2.82% of 80287) affected shaders: MaxWaves: 57164 -> 57016 (-0.26%); split: +0.04%, -0.30% Instrs: 2711595 -> 2678247 (-1.23%); split: -1.23%, +0.00% CodeSize: 14066656 -> 13929720 (-0.97%); split: -1.01%, +0.03% VGPRs: 139452 -> 140004 (+0.40%); split: -0.03%, +0.42% Latency: 15902794 -> 15875935 (-0.17%); split: -0.17%, +0.00% InvThroughput: 2179122 -> 2165716 (-0.62%); split: -0.62%, +0.00% SClause: 61416 -> 61477 (+0.10%); split: -0.01%, +0.11% Copies: 169781 -> 175175 (+3.18%); split: -0.05%, +3.22% Branches: 53491 -> 53469 (-0.04%) PreSGPRs: 114087 -> 114086 (-0.00%) PreVGPRs: 115702 -> 115697 (-0.00%) VALU: 1555907 -> 1535514 (-1.31%); split: -1.31%, +0.00% SALU: 362560 -> 353803 (-2.42%) SMEM: 106263 -> 106259 (-0.00%) Reviewed-by: Marek Olšák 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 90cf999a80f..4ec78a5455e 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -249,6 +249,7 @@ radv_optimize_nir_algebraic(nir_shader *nir, bool opt_offsets, bool opt_mqsad) .discard_ok = true, }; NIR_PASS(_, nir, nir_opt_peephole_select, &peephole_select_options); + NIR_PASS(_, nir, nir_opt_undef); NIR_PASS(_, nir, nir_opt_phi_to_bool); NIR_PASS(more_algebraic, nir, nir_opt_algebraic); NIR_PASS(_, nir, nir_opt_generate_bfi);