From 59308f92bfbcf0b274f79a906a0b7ee6389281d1 Mon Sep 17 00:00:00 2001 From: Mel Henning Date: Thu, 22 May 2025 18:23:33 -0400 Subject: [PATCH] nak: Call nir_lower_undef_to_zero Totals: CodeSize: 4571686864 -> 4545122720 (-0.58%); split: -0.59%, +0.01% Number of GPRs: 10994283 -> 10963889 (-0.28%); split: -0.28%, +0.00% SLM Size: 1893964 -> 1855380 (-2.04%) Static cycle count: 1114502308 -> 1104322907 (-0.91%); split: -0.93%, +0.02% Spills to memory: 573363 -> 480689 (-16.16%) Fills from memory: 573363 -> 480689 (-16.16%) Spills to reg: 1625502 -> 458804 (-71.77%); split: -71.78%, +0.00% Fills from reg: 878478 -> 303068 (-65.50%); split: -65.50%, +0.00% Max warps/SM: 7235748 -> 7245516 (+0.13%) Totals from 25050 (12.75% of 196502) affected shaders: CodeSize: 1870779504 -> 1844215360 (-1.42%); split: -1.45%, +0.03% Number of GPRs: 2578387 -> 2547993 (-1.18%); split: -1.18%, +0.00% SLM Size: 890840 -> 852256 (-4.33%) Static cycle count: 439061010 -> 428881609 (-2.32%); split: -2.37%, +0.05% Spills to memory: 268807 -> 176133 (-34.48%) Fills from memory: 268807 -> 176133 (-34.48%) Spills to reg: 1485538 -> 318840 (-78.54%); split: -78.54%, +0.00% Fills from reg: 753623 -> 178213 (-76.35%); split: -76.35%, +0.00% Max warps/SM: 556844 -> 566612 (+1.75%) Reviewed-by: Faith Ekstrand Part-of: --- src/nouveau/compiler/nak_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nouveau/compiler/nak_nir.c b/src/nouveau/compiler/nak_nir.c index cbc236b45ef..977c999670b 100644 --- a/src/nouveau/compiler/nak_nir.c +++ b/src/nouveau/compiler/nak_nir.c @@ -172,6 +172,7 @@ optimize_nir(nir_shader *nir, const struct nak_compiler *nak, bool allow_copies) OPT(nir, nir_opt_gcm, false); OPT(nir, nir_opt_undef); } while (progress); + OPT(nir, nir_lower_undef_to_zero); OPT(nir, nir_remove_dead_variables, nir_var_function_temp, NULL); }