Merge pull request #6 from nielsdos/fix-use-list

Fix SCCP use list update for op3
This commit is contained in:
Dmitry Stogov 2023-02-13 09:37:52 +03:00 committed by GitHub
commit ab994122e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -324,7 +324,7 @@ restart:
}
}
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) {