| ... | @@ -9593,23 +9593,6 @@ static IrInstruction *ir_get_ref(IrAnalyze *ira, IrInstruction *source_instructi | ... | @@ -9593,23 +9593,6 @@ static IrInstruction *ir_get_ref(IrAnalyze *ira, IrInstruction *source_instructi |
| 9593 | if (type_is_invalid(value->value.type)) | 9593 | if (type_is_invalid(value->value.type)) |
| 9594 | return ira->codegen->invalid_instruction; | 9594 | return ira->codegen->invalid_instruction; |
| 9595 | | 9595 | |
| 9596 | if (value->id == IrInstructionIdLoadPtr) { | | |
| 9597 | IrInstructionLoadPtr *load_ptr_inst = (IrInstructionLoadPtr *) value; | | |
| 9598 | | | |
| 9599 | if (load_ptr_inst->ptr->value.type->data.pointer.is_const) { | | |
| 9600 | return load_ptr_inst->ptr; | | |
| 9601 | } | | |
| 9602 | | | |
| 9603 | type_ensure_zero_bits_known(ira->codegen, value->value.type); | | |
| 9604 | if (type_is_invalid(value->value.type)) { | | |
| 9605 | return ira->codegen->invalid_instruction; | | |
| 9606 | } | | |
| 9607 | | | |
| 9608 | if (!type_has_bits(value->value.type)) { | | |
| 9609 | return load_ptr_inst->ptr; | | |
| 9610 | } | | |
| 9611 | } | | |
| 9612 | | | |
| 9613 | if (instr_is_comptime(value)) { | 9596 | if (instr_is_comptime(value)) { |
| 9614 | ConstExprValue *val = ir_resolve_const(ira, value, UndefOk); | 9597 | ConstExprValue *val = ir_resolve_const(ira, value, UndefOk); |
| 9615 | if (!val) | 9598 | if (!val) |