From e210b79ce3932f7fb1387d68a4cad495b77746f4 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 31 Mar 2025 11:15:55 -0700 Subject: [PATCH] brw/nir: Lower fsign again after last call to brw_nir_optimize No shader-db or fossil-db changes on any Intel platform. Fixes: 13332c23 ("intel/brw: Unconditionally run optimizations after nir_opt_uniform_subgroup") Closes: #12888 Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_nir.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index f7dc469bd46..4b19ed0fbb3 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1954,6 +1954,13 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, OPT(nir_lower_subgroups, &subgroups_options); } + /* Run fsign lowering again after the last time brw_nir_optimize is called. + * As is the case with conversion lowering (below), brw_nir_optimize can + * create additional fsign instructions. + */ + if (OPT(brw_nir_lower_fsign)) + OPT(nir_opt_dce); + /* Run intel_nir_lower_conversions only after the last time * brw_nir_optimize is called. Various optimizations invoked there can * rematerialize the conversions that the lowering pass eliminates.