diff --git a/src/compiler/nir/nir_loop_analyze.c b/src/compiler/nir/nir_loop_analyze.c index d13dd70d7d9..7cd3b60430b 100644 --- a/src/compiler/nir/nir_loop_analyze.c +++ b/src/compiler/nir/nir_loop_analyze.c @@ -1112,11 +1112,13 @@ force_unroll_array_access(loop_info_state *state, nir_deref_instr *deref) unsigned array_size = find_array_access_via_induction(state, deref, NULL); if (array_size) { if ((array_size == state->loop->info->max_trip_count) && - (deref->mode & (nir_var_shader_in | nir_var_shader_out | - nir_var_shader_temp | nir_var_function_temp))) + nir_deref_mode_must_be(deref, nir_var_shader_in | + nir_var_shader_out | + nir_var_shader_temp | + nir_var_function_temp)) return true; - if (deref->mode & state->indirect_mask) + if (nir_deref_mode_must_be(deref, state->indirect_mask)) return true; }