Commit 776423bbf7

Andrew Kelley <andrew@ziglang.org>
2019-07-16 05:44:44
fix result location alignment in ir_render_call
1 parent 6fe3b20
Changed files (1)
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;