From 86c57ebe0ed1acc98545746058862db7429412da Mon Sep 17 00:00:00 2001 From: Boyan Ding Date: Fri, 21 Aug 2015 21:42:45 +0800 Subject: [PATCH] i965/nir: Make use of nir_opt_undef Shader-db result on Ivy Bridge: total instructions in shared programs: 145484 -> 145445 (-0.03%) instructions in affected programs: 225 -> 186 (-17.33%) helped: 5 HURT: 0 Reviewed-by: Matt Turner Reviewed-by: Thomas Helland Signed-off-by: Boyan Ding --- src/mesa/drivers/dri/i965/brw_nir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 8c6d28a7cd8..247b223f2e2 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -63,6 +63,8 @@ nir_optimize(nir_shader *nir, bool is_scalar) nir_validate_shader(nir); progress |= nir_opt_remove_phis(nir); nir_validate_shader(nir); + progress |= nir_opt_undef(nir); + nir_validate_shader(nir); } while (progress); } -- 2.30.2