nir/lower_vec_to_movs: don't vectorize unsupports ops

If the instruction being coalesced would be vectorized but the target
doesn't support vectorizing that op, skip coalescing.
Reuse the callbacks from alu_to_scalar to describe which ops should not
be vectorized.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6506>
This commit is contained in:
Erico Nunes
2020-08-30 15:07:23 +02:00
committed by Marge Bot
parent b75d8052a7
commit faaba0d6af
7 changed files with 57 additions and 12 deletions

View File

@@ -1183,7 +1183,7 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
if (!is_scalar) {
OPT(nir_move_vec_src_uses_to_dest);
OPT(nir_lower_vec_to_movs);
OPT(nir_lower_vec_to_movs, NULL, NULL);
}
OPT(nir_opt_dce);