nir: Handle vec8/16 in opt_undef_vecN

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365>
This commit is contained in:
Jason Ekstrand 2020-03-30 12:09:03 -05:00 committed by Marge Bot
parent 99540edfde
commit c26bf848ba

View file

@ -77,10 +77,7 @@ opt_undef_csel(nir_alu_instr *instr)
static bool
opt_undef_vecN(nir_builder *b, nir_alu_instr *alu)
{
if (alu->op != nir_op_vec2 &&
alu->op != nir_op_vec3 &&
alu->op != nir_op_vec4 &&
alu->op != nir_op_mov)
if (!nir_op_is_vec(alu->op))
return false;
assert(alu->dest.dest.is_ssa);