nir: Shrink store intrinsic num_components to the size used by the writemask.
authorEric Anholt <eric@anholt.net>
Thu, 23 Jul 2020 21:32:13 +0000 (14:32 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 20 Aug 2020 16:44:08 +0000 (16:44 +0000)
commitb440c28b78fc5e6f319f988f21a7470254b00f06
tree3e57dbfbf0ece3c8bc676add980bccf8c5f39d9e
parent5f26c21e62466783cd031c45a39544c992cee202
nir: Shrink store intrinsic num_components to the size used by the writemask.

This cuts a bunch of vector setup for undef components in the i965 vec4
backend.  Noticed while looking into codegen regressions in nir-to-tgsi.

brw results:
total instructions in shared programs: 3893221 -> 3881461 (-0.30%)
total cycles in shared programs: 113792154 -> 113810288 (0.02%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
src/compiler/nir/nir_opt_shrink_vectors.c