etnaviv: call nir_opt_shrink_vectors(..) in opt loop

total instructions in shared programs: 105044 -> 103312 (-1.65%)
instructions in affected programs: 27328 -> 25596 (-6.34%)
helped: 55
HURT: 0
helped stats (abs) min: 4 max: 96 x̄: 31.49 x̃: 24
helped stats (rel) min: 1.18% max: 23.08% x̄: 8.26% x̃: 6.88%
95% mean confidence interval for instructions value: -37.81 -25.18
95% mean confidence interval for instructions %-change: -9.66% -6.85%
Instructions are helped.

total temps in shared programs: 2960 -> 2917 (-1.45%)
temps in affected programs: 425 -> 382 (-10.12%)
helped: 41
HURT: 6
helped stats (abs) min: 1 max: 3 x̄: 1.20 x̃: 1
helped stats (rel) min: 7.14% max: 25.00% x̄: 13.79% x̃: 12.50%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 12.50% max: 25.00% x̄: 17.52% x̃: 16.67%
95% mean confidence interval for temps value: -1.17 -0.66
95% mean confidence interval for temps %-change: -13.30% -6.29%
Temps are helped.

total immediates in shared programs: 16772 -> 16468 (-1.81%)
immediates in affected programs: 4304 -> 4000 (-7.06%)
helped: 59
HURT: 0
helped stats (abs) min: 4 max: 16 x̄: 5.15 x̃: 4
helped stats (rel) min: 2.22% max: 33.33% x̄: 9.31% x̃: 7.14%
95% mean confidence interval for immediates value: -5.88 -4.43
95% mean confidence interval for immediates %-change: -11.14% -7.49%
Immediates are helped.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6572>
diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
index e48c048..8b3296a 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
@@ -146,6 +146,7 @@
 
       NIR_PASS_V(s, nir_lower_vars_to_ssa);
       progress |= OPT(s, nir_opt_copy_prop_vars);
+      progress |= OPT(s, nir_opt_shrink_vectors);
       progress |= OPT(s, nir_copy_prop);
       progress |= OPT(s, nir_opt_dce);
       progress |= OPT(s, nir_opt_cse);