X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fcompiler%2Fnir%2Fnir_opt_undef.c;h=1f939e82c68e25f188cc515add2f9daccc47437d;hb=eb3047c094abfa03e071453d7c373e9c2c574370;hp=c26158dab7ebed001cfebe6d5ecd58454af362cd;hpb=a331d7d1cdfdc971f707fb6b1f71edbad622c804;p=mesa.git diff --git a/src/compiler/nir/nir_opt_undef.c b/src/compiler/nir/nir_opt_undef.c index c26158dab7e..1f939e82c68 100644 --- a/src/compiler/nir/nir_opt_undef.c +++ b/src/compiler/nir/nir_opt_undef.c @@ -63,7 +63,7 @@ opt_undef_csel(nir_alu_instr *instr) memset(&empty_src, 0, sizeof(empty_src)); nir_instr_rewrite_src(&instr->instr, &instr->src[1].src, empty_src); nir_instr_rewrite_src(&instr->instr, &instr->src[2].src, empty_src); - instr->op = nir_op_imov; + instr->op = nir_op_mov; return true; } @@ -80,8 +80,7 @@ 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_fmov && - alu->op != nir_op_imov) + alu->op != nir_op_mov) return false; assert(alu->dest.dest.is_ssa); @@ -154,10 +153,15 @@ nir_opt_undef(nir_shader *shader) } } - if (progress) + if (progress) { nir_metadata_preserve(function->impl, nir_metadata_block_index | nir_metadata_dominance); + } else { +#ifndef NDEBUG + function->impl->valid_metadata &= ~nir_metadata_not_properly_reset; +#endif + } } }