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 <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>
This commit is contained in:
Eric Anholt
2020-07-22 21:35:07 -07:00
committed by Marge Bot
parent 1c9906d5ff
commit 023e6669cc

View File

@@ -516,6 +516,8 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
if (is_scalar) { if (is_scalar) {
OPT(nir_lower_alu_to_scalar, NULL, NULL); OPT(nir_lower_alu_to_scalar, NULL, NULL);
} else {
OPT(nir_opt_shrink_vectors);
} }
OPT(nir_copy_prop); OPT(nir_copy_prop);