nir: add a nir_opt_if_options enum

And don't enable nir_opt_if_optimize_phi_true_false on radeonsi with
LLVM 14 because it crashes Blender.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6976
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17949>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2022-08-08 17:12:14 +02:00
committed by Marge Bot
parent 0ca0d2d450
commit 70891edd97
20 changed files with 39 additions and 29 deletions

View File

@@ -625,7 +625,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
OPT(nir_copy_prop);
OPT(nir_opt_dce);
}
OPT(nir_opt_if, false);
OPT(nir_opt_if, nir_opt_if_optimize_phi_true_false);
OPT(nir_opt_conditional_discard);
if (nir->options->max_unroll_iterations != 0) {
OPT(nir_opt_loop_unroll);