From 023e6669cc1d7d321e0bd5b5293422cd73b3d658 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 22 Jul 2020 21:35:07 -0700 Subject: [PATCH] i965: Enable vector shrinking in the vec4 backend. This manages to make some extra vec operations that would turn into movs go away. brw shader-db: total instructions in shared programs: 3895037 -> 3893221 (-0.05%) total cycles in shared programs: 113832759 -> 113792154 (-0.04%) Reviewed-by: Kenneth Graunke Part-of: --- src/intel/compiler/brw_nir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 9a6914f92f2..510ab0b769c 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -516,6 +516,8 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler, if (is_scalar) { OPT(nir_lower_alu_to_scalar, NULL, NULL); + } else { + OPT(nir_opt_shrink_vectors); } OPT(nir_copy_prop); -- 2.30.2