From: Iago Toral Quiroga Date: Wed, 15 Jul 2015 07:32:17 +0000 (+0200) Subject: i965/nir: Do not scalarize phis in non-scalar setups X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da1b1bf85cdc691ec27f379de84dec495cdd51e0;p=mesa.git i965/nir: Do not scalarize phis in non-scalar setups Significantly reduces register pressure in some piglit tests. Reviewed-by: Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 49d17422546..b5788fa2e33 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -42,8 +42,12 @@ nir_optimize(nir_shader *nir, bool is_scalar) progress |= nir_copy_prop(nir); nir_validate_shader(nir); - nir_lower_phis_to_scalar(nir); - nir_validate_shader(nir); + + if (is_scalar) { + nir_lower_phis_to_scalar(nir); + nir_validate_shader(nir); + } + progress |= nir_copy_prop(nir); nir_validate_shader(nir); progress |= nir_opt_dce(nir);