Skip to content

Commit

Permalink
Fix SCCP use list update for op3
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdos committed Feb 12, 2023
1 parent 6b8a33d commit 1e772c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ir_sccp.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ static void ir_sccp_fold2(ir_ctx *ctx, ir_insn *_values, ir_ref ref, ir_bitqueue
}
}
if (insn->op3 != ctx->fold_insn.op3) {
if (!IR_IS_CONST_REF(insn->op3) && insn->op3 != ctx->fold_insn.op2 && insn->op3 != ctx->fold_insn.op2) {
if (!IR_IS_CONST_REF(insn->op3) && insn->op3 != ctx->fold_insn.op1 && insn->op3 != ctx->fold_insn.op2) {
ir_sccp_remove_from_use_list(ctx, insn->op3, ref);
}
if (!IR_IS_CONST_REF(ctx->fold_insn.op3) && ctx->fold_insn.op3 != insn->op1 && ctx->fold_insn.op3 != insn->op2) {
Expand Down

0 comments on commit 1e772c5

Please sign in to comment.