From c515d4bd81da148ed5cd595da23e992c0f0691b5 Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Tue, 1 Oct 2024 07:40:54 +0200 Subject: [PATCH] ir3: run 64b phi lowering together with other 64b lowerings nir_lower_64bit_phis was run in ir3_optimize_loop where it would fight with nir_opt_if, causing shader compilation hangs. There's no point in running this pass in the optimization loop as 64b phis should be lowered together with the other 64b operations and then never appear again. Signed-off-by: Job Noorman Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10355 Part-of: --- src/freedreno/ir3/ir3_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 878176563a2..bf14ccdfc19 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -351,7 +351,6 @@ ir3_optimize_loop(struct ir3_compiler *compiler, nir_shader *s) } progress |= OPT(s, nir_opt_if, nir_opt_if_optimize_phi_true_false); progress |= OPT(s, nir_opt_loop_unroll); - progress |= OPT(s, nir_lower_64bit_phis); progress |= OPT(s, nir_opt_remove_phis); progress |= OPT(s, nir_opt_undef); did_progress |= progress; @@ -992,6 +991,7 @@ ir3_nir_lower_variant(struct ir3_shader_variant *so, nir_shader *s) progress |= OPT(s, ir3_nir_lower_64b_undef); progress |= OPT(s, nir_lower_int64); progress |= OPT(s, ir3_nir_lower_64b_intrinsics); + progress |= OPT(s, nir_lower_64bit_phis); /* Cleanup code leftover from lowering passes before opt_preamble */ if (progress) {