- struct gallivm_state *gallivm = bld_base->base.gallivm;
- LLVMBuilderRef builder = gallivm->builder;
- struct tgsi_declaration_range range = get_array_range(bld_base, file, reg_index, reg_indirect);
- LLVMValueRef index = emit_array_index(bld, reg_indirect, reg_index - range.First);
- LLVMValueRef array = get_alloca_for_array(bld_base, file, reg_index);
-
- if (array) {
- LLVMValueRef indices[2];
- index = LLVMBuildMul(builder, index, lp_build_const_int32(gallivm, TGSI_NUM_CHANNELS), "");
- index = LLVMBuildAdd(builder, index, lp_build_const_int32(gallivm, chan_index), "");
- indices[0] = bld_base->uint_bld.zero;
- indices[1] = index;
- LLVMValueRef pointer = LLVMBuildGEP(builder, array, indices, 2, "");
- LLVMBuildStore(builder, value, pointer);
- return NULL;
- } else {
- return LLVMBuildInsertElement(builder,
+ LLVMBuilderRef builder = bld_base->base.gallivm->builder;
+ struct tgsi_declaration_range range = get_array_range(bld_base, file, reg_indirect);
+
+ return LLVMBuildInsertElement(builder,