Skip to content

Commit c6be150

Browse files
committed
Dsable CSE to avoid over-optimization
1 parent f9e0ff8 commit c6be150

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4743,7 +4743,17 @@ static int zend_jit_math_long_long(zend_jit_ctx *jit,
47434743
op1 = jit_Z_LVAL(jit, op1_addr);
47444744
op2 = (same_ops) ? op1 : jit_Z_LVAL(jit, op2_addr);
47454745
#endif
4746-
ref = ir_BINARY_OP_D(op, ir_INT2D(op1), ir_INT2D(op2));
4746+
#if 1
4747+
/* disable CSE */
4748+
ir_ref old_cse_limit = jit->ctx.fold_cse_limit;
4749+
jit->ctx.fold_cse_limit = 0x7fffffff;
4750+
#endif
4751+
op1 = ir_INT2D(op1);
4752+
op2 = ir_INT2D(op2);
4753+
#if 1
4754+
jit->ctx.fold_cse_limit = old_cse_limit;
4755+
#endif
4756+
ref = ir_BINARY_OP_D(op, op1, op2);
47474757
jit_set_Z_DVAL(jit, res_addr, ref);
47484758
if (Z_MODE(res_addr) != IS_REG) {
47494759
jit_set_Z_TYPE_INFO(jit, res_addr, IS_DOUBLE);

0 commit comments

Comments
 (0)