nir/lower_ssbo: Don't set align_* for atomics
[mesa.git] / src / compiler / nir / nir_opt_peephole_select.c
index 869f663a89a6636b6c06656b5cc6b541c254ed8c..590fec82405171a7ec7990168d4d387afeca7195 100644 (file)
@@ -119,6 +119,8 @@ block_check_for_allowed_instrs(nir_block *block, unsigned *count,
          case nir_op_vec2:
          case nir_op_vec3:
          case nir_op_vec4:
+         case nir_op_vec8:
+         case nir_op_vec16:
             movelike = true;
             break;
 
@@ -152,10 +154,6 @@ block_check_for_allowed_instrs(nir_block *block, unsigned *count,
          if (!mov->dest.dest.is_ssa)
             return false;
 
-         const struct nir_block *const expected_block = mov->instr.block;
-         const nir_alu_type expected_type =
-            nir_alu_type_get_base_type(nir_op_infos[mov->op].output_type);
-
          if (alu_ok) {
             /* If the ALU operation is an fsat or a move-like operation, do
              * not count it.  The expectation is that it will eventually be
@@ -308,9 +306,7 @@ nir_opt_peephole_select_impl(nir_function_impl *impl, unsigned limit,
    if (progress) {
       nir_metadata_preserve(impl, nir_metadata_none);
    } else {
-#ifndef NDEBUG
-      impl->valid_metadata &= ~nir_metadata_not_properly_reset;
-#endif
+      nir_metadata_preserve(impl, nir_metadata_all);
    }
 
    return progress;