diff --git a/src/compiler/nir/nir_opt_undef.c b/src/compiler/nir/nir_opt_undef.c index a77d821aff4..ce950f4c039 100644 --- a/src/compiler/nir/nir_opt_undef.c +++ b/src/compiler/nir/nir_opt_undef.c @@ -102,7 +102,8 @@ nir_get_undef_mask(nir_def *def) nir_alu_instr *alu = nir_instr_as_alu(instr); unsigned undef = 0; - if (nir_op_is_vec(alu->op)) { + /* nir_op_mov of undef is handled by opt_undef_vecN() */ + if (nir_op_is_vec(alu->op) && alu->op != nir_op_mov) { for (int i = 0; i < nir_op_infos[alu->op].num_inputs; i++) { if (alu->src[i].src.ssa->parent_instr->type == nir_instr_type_undef) {