diff --git a/.pick_status.json b/.pick_status.json index c979b836ccf..9211c3e430e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4514,7 +4514,7 @@ "description": "brw: Call nir_opt_algebraic_late later in brw_postprocess_nir_opts", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "442daeb54a2e43bd450ebbb37fc05001f4acd08f", "notes": null diff --git a/src/intel/compiler/brw/brw_nir.c b/src/intel/compiler/brw/brw_nir.c index b134019671a..ecf587a69e2 100644 --- a/src/intel/compiler/brw/brw_nir.c +++ b/src/intel/compiler/brw/brw_nir.c @@ -2680,35 +2680,14 @@ brw_postprocess_nir_opts(nir_shader *nir, const struct brw_compiler *compiler, OPT(nir_opt_peephole_select, &peephole_select_options); } - do { - progress = false; - - OPT(brw_nir_opt_fsat); - OPT(nir_opt_algebraic_late); - OPT(brw_nir_lower_fsign); - - if (progress) { - OPT(nir_opt_constant_folding); - OPT(nir_opt_copy_prop); - OPT(nir_opt_dce); - OPT(nir_opt_cse); - } - } while (progress); - - OPT(nir_lower_fp16_casts, nir_lower_fp16_split_fp64); - OPT(nir_lower_alu_to_scalar, NULL, NULL); - - while (OPT(nir_opt_algebraic_distribute_src_mods)) { + if (OPT(nir_lower_alu_to_scalar, NULL, NULL)) OPT(nir_opt_constant_folding); - OPT(nir_opt_copy_prop); - OPT(nir_opt_dce); - OPT(nir_opt_cse); - } OPT(nir_opt_copy_prop); OPT(nir_opt_dce); + OPT(nir_opt_cse); nir_move_options move_all = nir_move_const_undef | nir_move_load_ubo | nir_move_load_input | nir_move_comparisons | @@ -2750,6 +2729,20 @@ brw_postprocess_nir_opts(nir_shader *nir, const struct brw_compiler *compiler, */ brw_nir_lower_int64(nir, devinfo); + do { + progress = false; + + OPT(nir_opt_algebraic_late); + OPT(nir_opt_algebraic_distribute_src_mods); + + if (progress) { + OPT(nir_opt_constant_folding); + OPT(nir_opt_copy_prop); + OPT(nir_opt_dce); + OPT(nir_opt_cse); + } + } while (progress); + /* Deal with EU fusion */ if (devinfo->ver == 12) { nir_divergence_options options =