diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 626fecd04f9..634c8a17021 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -2146,6 +2146,8 @@ v3d_optimize_nir(struct v3d_compile *c, struct nir_shader *s) NIR_PASS(progress, s, nir_opt_dce); NIR_PASS(progress, s, nir_opt_dead_cf); NIR_PASS(progress, s, nir_opt_cse); + /* before peephole_select as it can generate 64 bit bcsels */ + NIR_PASS(progress, s, nir_lower_64bit_phis); NIR_PASS(progress, s, nir_opt_peephole_select, 0, false, false); NIR_PASS(progress, s, nir_opt_peephole_select, 24, true, true); NIR_PASS(progress, s, nir_opt_algebraic);