nir/opt_vectorize: fix call to filter function

Due to the typo, it could happen that instructions
got further vectorized than intended.

Fixes: 8eaf9c61d1 ('nir/opt_vectorize: don't hash filtered instructions')
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8352>
This commit is contained in:
Daniel Schürmann 2021-01-06 19:06:51 +01:00 committed by Marge Bot
parent 03999595e7
commit 22b89d9a52

View file

@ -375,7 +375,7 @@ vec_instr_set_add_or_rewrite(struct nir_shader *nir, struct set *instr_set,
old_instr, instr);
if (new_instr) {
if (instr_can_rewrite(new_instr, nir->options->vectorize_vec2_16bit) &&
(!filter || filter(instr, data)))
(!filter || filter(new_instr, data)))
_mesa_set_add(instr_set, new_instr);
return true;
}