fix result location alignment in ir_render_call

This commit is contained in:
Andrew Kelley 2019-07-15 23:44:44 -04:00
parent 6fe3b20962
commit 776423bbf7
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -3837,7 +3837,7 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutable *executable, IrInstr
return result_loc;
} else if (handle_is_ptr(src_return_type)) {
LLVMValueRef store_instr = LLVMBuildStore(g->builder, result, result_loc);
LLVMSetAlignment(store_instr, LLVMGetAlignment(result_loc));
LLVMSetAlignment(store_instr, get_ptr_align(g, instruction->result_loc->value.type));
return result_loc;
} else {
return result;