mirror of
https://github.com/danog/ir.git
synced 2024-11-26 20:34:53 +01:00
Removed wrong code selection rule
This commit is contained in:
parent
6f8aa7b540
commit
842f97cbcb
10
ir_x86.dasc
10
ir_x86.dasc
@ -1743,21 +1743,11 @@ store_int:
|
||||
} else {
|
||||
ir_match_fuse_load(ctx, op1_insn->op2, ref);
|
||||
}
|
||||
if (op1_insn->op == IR_AND && ctx->use_lists[op2_insn->op1].count == 1) {
|
||||
/* v = AND(_, _); c = CMP(v, 0) ... IF(c) => SKIP_TEST; SKIP ... GUARD_TEST */
|
||||
if (IR_IS_CONST_REF(op1_insn->op2)) {
|
||||
ir_match_fuse_load(ctx, op1_insn->op1, ref);
|
||||
}
|
||||
ctx->rules[op2_insn->op1] = IR_FUSED | IR_TEST_INT;
|
||||
ctx->rules[insn->op2] = IR_FUSED | IR_SIMPLE | IR_NOP;
|
||||
return IR_GUARD_TEST_INT;
|
||||
} else {
|
||||
/* v = BINOP(_, _); c = CMP(v, 0) ... IF(c) => BINOP; SKIP_CMP ... GUARD_JCC */
|
||||
ctx->rules[op2_insn->op1] = IR_BINOP_INT;
|
||||
ctx->rules[insn->op2] = IR_FUSED | IR_CMP_INT;
|
||||
return IR_GUARD_JCC_INT;
|
||||
}
|
||||
}
|
||||
} else if ((ctx->flags & IR_OPT_CODEGEN)
|
||||
&& op2_insn->op1 == insn->op2 - 2 /* before previous instruction */
|
||||
&& ir_in_same_block(ctx, op2_insn->op1)
|
||||
|
Loading…
Reference in New Issue
Block a user