Skip to content

Commit c87102c

Browse files
committedJul 13, 2018
ir_get_ref: delete unnecessary and probably buggy code
·
0.15.10.3.0
1 parent 171f33b commit c87102c

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed
 

‎src/ir.cpp‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9593,23 +9593,6 @@ static IrInstruction *ir_get_ref(IrAnalyze *ira, IrInstruction *source_instructi
95939593
if (type_is_invalid(value->value.type))
95949594
return ira->codegen->invalid_instruction;
95959595

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-
96139596
if (instr_is_comptime(value)) {
96149597
ConstExprValue *val = ir_resolve_const(ira, value, UndefOk);
96159598
if (!val)

0 commit comments

Comments
 (0)
Please sign in to comment.