nir: nir_range_analysis needs to be updated for vec16
[mesa.git] / src / compiler / nir / nir_search.c
index 09dd4c341e424eb14de12bfa504b4c3b890d0915..577f0be0b9278fbff69be9ada4b69ab75f541653 100644 (file)
@@ -913,8 +913,10 @@ nir_algebraic_impl(nir_function_impl *impl,
     * anything other than constants and ALU instructions.
     */
    struct util_dynarray states = {0};
-   if (!util_dynarray_resize(&states, uint16_t, impl->ssa_alloc))
+   if (!util_dynarray_resize(&states, uint16_t, impl->ssa_alloc)) {
+      nir_metadata_preserve(impl, nir_metadata_all);
       return false;
+   }
    memset(states.data, 0, states.size);
 
    struct hash_table *range_ht = _mesa_pointer_hash_table_create(NULL);