From 218be90084db46e5db58c60b64dfb6ae91f48c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 17 Mar 2026 10:16:16 +0100 Subject: [PATCH] radv: call nir_opt_if late again Totals from 1715 (1.22% of 140074) affected shaders: Instrs: 1086964 -> 1079896 (-0.65%); split: -0.65%, +0.00% CodeSize: 5600856 -> 5554620 (-0.83%); split: -0.84%, +0.02% VGPRs: 95868 -> 95976 (+0.11%) Latency: 4005981 -> 3992353 (-0.34%); split: -0.38%, +0.04% InvThroughput: 682121 -> 682071 (-0.01%); split: -0.11%, +0.10% VClause: 19117 -> 19093 (-0.13%); split: -0.15%, +0.02% SClause: 17075 -> 17040 (-0.20%); split: -0.21%, +0.01% Copies: 101031 -> 98193 (-2.81%); split: -2.87%, +0.07% Branches: 24106 -> 24011 (-0.39%); split: -0.43%, +0.03% PreSGPRs: 67254 -> 66797 (-0.68%); split: -0.70%, +0.02% PreVGPRs: 71827 -> 71830 (+0.00%) VALU: 571206 -> 570516 (-0.12%); split: -0.12%, +0.00% SALU: 180525 -> 177146 (-1.87%); split: -1.90%, +0.03% VMEM: 34030 -> 34010 (-0.06%) SMEM: 27669 -> 27622 (-0.17%) VOPD: 4485 -> 4481 (-0.09%); split: +0.04%, -0.13% Part-of: --- src/amd/vulkan/radv_pipeline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 7b88968f4d3..7752146d190 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -506,6 +506,7 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_graphics_stat NIR_PASS(_, stage->nir, nir_opt_copy_prop); NIR_PASS(_, stage->nir, nir_opt_constant_folding); NIR_PASS(_, stage->nir, nir_opt_cse); + NIR_PASS(_, stage->nir, nir_opt_if, nir_opt_if_optimize_phi_true_false); NIR_PASS(_, stage->nir, nir_opt_shrink_vectors, true); NIR_PASS(_, stage->nir, ac_nir_flag_smem_for_loads, gfx_level, use_llvm);