Skip to content

Commit

Permalink
Fix IR reconstruction
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Mar 18, 2024
1 parent 052ccc9 commit eaa6750
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ir_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ static ir_ref ir_optimize_phi(ir_ctx *ctx, ir_ref merge_ref, ir_insn *merge, ir_

next->op1 = root->op1;
ir_use_list_replace_one(ctx, root->op1, root_ref, next_ref);
ir_use_list_remove_all(ctx, root->op2, root_ref);
if (!IR_IS_CONST_REF(insn->op1)) {
ir_use_list_remove_all(ctx, insn->op1, cond_ref);
}
Expand Down Expand Up @@ -349,7 +348,7 @@ static ir_ref ir_optimize_phi(ir_ctx *ctx, ir_ref merge_ref, ir_insn *merge, ir_

next->op1 = root->op1;
ir_use_list_replace_one(ctx, root->op1, root_ref, next_ref);
ir_use_list_remove_all(ctx, root->op2, root_ref);
ir_use_list_remove_one(ctx, insn->op1, neg_ref);
if (!IR_IS_CONST_REF(insn->op1)) {
ir_use_list_remove_all(ctx, insn->op1, cond_ref);
}
Expand Down

0 comments on commit eaa6750

Please sign in to comment.