- case nir_deref_type_array: {
- nir_deref_array *arr = nir_deref_as_array(tail);
-
- switch (arr->deref_array_type) {
- case nir_deref_array_type_direct:
- /* This is possible if a loop unrolls and generates an
- * out-of-bounds offset. We need to handle this at least
- * somewhat gracefully.
- */
- if (arr->base_offset >= glsl_get_length(node->type))
- return NULL;
-
- if (node->children[arr->base_offset] == NULL) {
- node->children[arr->base_offset] =
- deref_node_create(node, tail->type, node->is_direct,
- state->dead_ctx);
- }
-
- node = node->children[arr->base_offset];
- break;
-
- case nir_deref_array_type_indirect:
- if (node->indirect == NULL) {
- node->indirect = deref_node_create(node, tail->type, false,
- state->dead_ctx);
- }