- struct vec_to_movs_state *state = void_state;
- nir_function_impl *impl = state->impl;
- nir_shader *shader = impl->function->shader;
-
- nir_foreach_instr_safe(block, instr) {
- if (instr->type != nir_instr_type_alu)
- continue;
-
- nir_alu_instr *vec = nir_instr_as_alu(instr);
-
- switch (vec->op) {
- case nir_op_vec2:
- case nir_op_vec3:
- case nir_op_vec4:
- break;
- default:
- continue; /* The loop */
- }
-
- if (vec->dest.dest.is_ssa) {
- /* Since we insert multiple MOVs, we have a register destination. */
- nir_register *reg = nir_local_reg_create(impl);
- reg->num_components = vec->dest.dest.ssa.num_components;