From 776423bbf72312e756eb661b616f0e1bb805f568 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 15 Jul 2019 23:44:44 -0400 Subject: fix result location alignment in ir_render_call --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 94e2a98b2f..234b28219b 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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; -- cgit v1.2.3