File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2156,7 +2156,6 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
2156
2156
llvm::Type* target_type = llvm_utils->get_type_from_ttype_t_util (x_m_array_type, module .get ());
2157
2157
llvm::Value *target = builder0.CreateAlloca (
2158
2158
target_type, nullptr , " fixed_size_reshaped_array" );
2159
- array = llvm_utils->create_gep (array, 0 );
2160
2159
llvm::Value* target_ = llvm_utils->create_gep (target, 0 );
2161
2160
ASR::dimension_t * asr_dims = nullptr ;
2162
2161
size_t asr_n_dims = ASRUtils::extract_dimensions_from_ttype (x_m_array_type, asr_dims);
@@ -3172,6 +3171,8 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
3172
3171
builder->CreateMemCpy (llvm_utils->create_gep (target_var, 0 ),
3173
3172
llvm::MaybeAlign (), init_value, llvm::MaybeAlign (), arg_size);
3174
3173
}
3174
+ } else if (ASR::is_a<ASR::ArrayReshape_t>(*v->m_symbolic_value )) {
3175
+ builder->CreateStore (LLVM::CreateLoad (*builder, init_value), target_var);
3175
3176
} else {
3176
3177
builder->CreateStore (init_value, target_var);
3177
3178
}
You can’t perform that action at this time.
0 commit comments