From 50bb16d8ea7d290e4d2a1ec096a04cafad86757e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Fri, 23 Jan 2026 09:07:17 +0100 Subject: [PATCH] nir/lower_non_uniform_access: flag IF as always divergent taken Totals from 849 (1.01% of 84383) affected shaders: (Navi48) Instrs: 5411150 -> 5387935 (-0.43%) CodeSize: 30782816 -> 30733420 (-0.16%); split: -0.21%, +0.05% Latency: 44569512 -> 44282889 (-0.64%) InvThroughput: 6822696 -> 6785429 (-0.55%); split: -0.55%, +0.00% SClause: 159022 -> 159017 (-0.00%) Branches: 174234 -> 152625 (-12.40%) Part-of: --- src/compiler/nir/nir_lower_non_uniform_access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_non_uniform_access.c b/src/compiler/nir/nir_lower_non_uniform_access.c index bdaffcb5508..f1834c08f51 100644 --- a/src/compiler/nir/nir_lower_non_uniform_access.c +++ b/src/compiler/nir/nir_lower_non_uniform_access.c @@ -463,7 +463,7 @@ nir_lower_non_uniform_access_impl(nir_function_impl *impl, all_equal_first = nir_iand(&b, all_equal_first, equal_first); } - nir_push_if(&b, all_equal_first); + nir_push_if(&b, all_equal_first)->control = nir_selection_control_divergent_always_taken; util_dynarray_foreach(&data.srcs, struct nu_handle_src, src) { for (uint32_t i = 0; i < key->handle_count; i++)