| ... | @@ -5362,7 +5362,8 @@ static LLVMValueRef ir_render_vector_to_array(CodeGen *g, IrExecutable *executab | ... | @@ -5362,7 +5362,8 @@ static LLVMValueRef ir_render_vector_to_array(CodeGen *g, IrExecutable *executab |
| 5362 | LLVMValueRef vector = ir_llvm_value(g, instruction->vector); | 5362 | LLVMValueRef vector = ir_llvm_value(g, instruction->vector); |
| 5363 | LLVMValueRef casted_ptr = LLVMBuildBitCast(g->builder, result_loc, | 5363 | LLVMValueRef casted_ptr = LLVMBuildBitCast(g->builder, result_loc, |
| 5364 | LLVMPointerType(get_llvm_type(g, instruction->vector->value.type), 0), ""); | 5364 | LLVMPointerType(get_llvm_type(g, instruction->vector->value.type), 0), ""); |
| 5365 | gen_store_untyped(g, vector, casted_ptr, get_ptr_align(g, instruction->result_loc->value.type), false); | 5365 | uint32_t alignment = get_ptr_align(g, instruction->result_loc->value.type); |
| | 5366 | gen_store_untyped(g, vector, casted_ptr, alignment, false); |
| 5366 | return result_loc; | 5367 | return result_loc; |
| 5367 | } | 5368 | } |
| 5368 | | 5369 | |
| ... | @@ -5375,7 +5376,10 @@ static LLVMValueRef ir_render_array_to_vector(CodeGen *g, IrExecutable *executab | ... | @@ -5375,7 +5376,10 @@ static LLVMValueRef ir_render_array_to_vector(CodeGen *g, IrExecutable *executab |
| 5375 | LLVMValueRef array_ptr = ir_llvm_value(g, instruction->array); | 5376 | LLVMValueRef array_ptr = ir_llvm_value(g, instruction->array); |
| 5376 | LLVMValueRef casted_ptr = LLVMBuildBitCast(g->builder, array_ptr, | 5377 | LLVMValueRef casted_ptr = LLVMBuildBitCast(g->builder, array_ptr, |
| 5377 | LLVMPointerType(get_llvm_type(g, vector_type), 0), ""); | 5378 | LLVMPointerType(get_llvm_type(g, vector_type), 0), ""); |
| 5378 | return gen_load_untyped(g, casted_ptr, 0, false, ""); | 5379 | ZigType *array_type = instruction->array->value.type; |
| | 5380 | assert(array_type->id == ZigTypeIdArray); |
| | 5381 | uint32_t alignment = get_abi_alignment(g, array_type->data.array.child_type); |
| | 5382 | return gen_load_untyped(g, casted_ptr, alignment, false, ""); |
| 5379 | } | 5383 | } |
| 5380 | | 5384 | |
| 5381 | static LLVMValueRef ir_render_assert_zero(CodeGen *g, IrExecutable *executable, | 5385 | static LLVMValueRef ir_render_assert_zero(CodeGen *g, IrExecutable *executable, |