From ccb02107611ddd4dcee90d1b323ef484612c5125 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 12 Apr 2022 21:40:35 -0400 Subject: [PATCH] agx: Don't lower phis in NIR We're ready for them now! Just scalarize. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 04f3ae947a3..142985cf062 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -1496,6 +1496,7 @@ agx_optimize_nir(nir_shader *nir) NIR_PASS(progress, nir, nir_copy_prop); NIR_PASS(progress, nir, nir_opt_remove_phis); + NIR_PASS(progress, nir, nir_lower_phis_to_scalar, true); NIR_PASS(progress, nir, nir_opt_dce); NIR_PASS(progress, nir, nir_opt_dead_cf); NIR_PASS(progress, nir, nir_opt_cse); @@ -1524,7 +1525,7 @@ agx_optimize_nir(nir_shader *nir) NIR_PASS_V(nir, nir_opt_sink, move_all); NIR_PASS_V(nir, nir_opt_move, move_all); - NIR_PASS_V(nir, nir_convert_from_ssa, true); + NIR_PASS_V(nir, nir_lower_phis_to_scalar, true); } /* ABI: position first, then user, then psiz */