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.