| ... | @@ -1290,13 +1290,11 @@ static LLVMValueRef ir_render_store_ptr(CodeGen *g, IrExecutable *executable, Ir | ... | @@ -1290,13 +1290,11 @@ static LLVMValueRef ir_render_store_ptr(CodeGen *g, IrExecutable *executable, Ir |
| 1290 | | 1290 | |
| 1291 | assert(instruction->ptr->value.type->id == TypeTableEntryIdPointer); | 1291 | assert(instruction->ptr->value.type->id == TypeTableEntryIdPointer); |
| 1292 | TypeTableEntry *op1_type = instruction->ptr->value.type->data.pointer.child_type; | 1292 | TypeTableEntry *op1_type = instruction->ptr->value.type->data.pointer.child_type; |
| 1293 | TypeTableEntry *op2_type = instruction->value->value.type; | | |
| 1294 | | 1293 | |
| 1295 | if (!type_has_bits(op1_type)) { | 1294 | if (!type_has_bits(op1_type)) { |
| 1296 | return nullptr; | 1295 | return nullptr; |
| 1297 | } | 1296 | } |
| 1298 | if (handle_is_ptr(op1_type)) { | 1297 | if (handle_is_ptr(op1_type)) { |
| 1299 | assert(op1_type == op2_type); | | |
| 1300 | return gen_struct_memcpy(g, value, ptr, op1_type); | 1298 | return gen_struct_memcpy(g, value, ptr, op1_type); |
| 1301 | } | 1299 | } |
| 1302 | | 1300 | |
| ... | @@ -2146,7 +2144,6 @@ static LLVMValueRef ir_render_err_wrap_payload(CodeGen *g, IrExecutable *executa | ... | @@ -2146,7 +2144,6 @@ static LLVMValueRef ir_render_err_wrap_payload(CodeGen *g, IrExecutable *executa |
| 2146 | LLVMBuildStore(g->builder, ok_err_val, err_tag_ptr); | 2144 | LLVMBuildStore(g->builder, ok_err_val, err_tag_ptr); |
| 2147 | | 2145 | |
| 2148 | LLVMValueRef payload_ptr = LLVMBuildStructGEP(g->builder, instruction->tmp_ptr, err_union_payload_index, ""); | 2146 | LLVMValueRef payload_ptr = LLVMBuildStructGEP(g->builder, instruction->tmp_ptr, err_union_payload_index, ""); |
| 2149 | assert(child_type == instruction->value->value.type); | | |
| 2150 | gen_assign_raw(g, payload_ptr, payload_val, child_type); | 2147 | gen_assign_raw(g, payload_ptr, payload_val, child_type); |
| 2151 | | 2148 | |
| 2152 | return instruction->tmp_ptr; | 2149 | return instruction->tmp_ptr; |