Skip to content

Commit c8126b5

Browse files
committed
Fix SSA dominance
1 parent d9dbe75 commit c8126b5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5392,6 +5392,7 @@ static int zend_jit_long_math_helper(zend_jit_ctx *jit,
53925392
op2_range->max >= SIZEOF_ZEND_LONG * 8) {
53935393

53945394
ir_ref if_wrong, cold_path, ref2, if_ok;
5395+
ir_ref op1_ref = jit_Z_LVAL(jit, op1_addr);
53955396

53965397
if_wrong = ir_IF(ir_UGT(ref, ir_CONST_LONG((SIZEOF_ZEND_LONG * 8) - 1)));
53975398
ir_IF_TRUE_cold(if_wrong);
@@ -5405,7 +5406,7 @@ static int zend_jit_long_math_helper(zend_jit_ctx *jit,
54055406
ref2 = ir_CONST_LONG(0);
54065407
cold_path = ir_END();
54075408
ir_IF_FALSE(if_wrong);
5408-
ref = ir_SHL_L(jit_Z_LVAL(jit, op1_addr), ref);
5409+
ref = ir_SHL_L(op1_ref, ref);
54095410
ir_MERGE_WITH(cold_path);
54105411
ref = ir_PHI_2(IR_LONG, ref, ref2);
54115412
} else {
@@ -5477,6 +5478,7 @@ static int zend_jit_long_math_helper(zend_jit_ctx *jit,
54775478
}
54785479
} else {
54795480
ir_ref zero_path = 0;
5481+
ir_ref op1_ref = jit_Z_LVAL(jit, op1_addr);
54805482

54815483
ref = jit_Z_LVAL(jit, op2_addr);
54825484
if ((op2_type & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) || !op2_range || (op2_range->min <= 0 && op2_range->max >= 0)) {
@@ -5496,7 +5498,7 @@ static int zend_jit_long_math_helper(zend_jit_ctx *jit,
54965498
zero_path = ir_END();
54975499
ir_IF_FALSE(if_minus_one);
54985500
}
5499-
ref = ir_MOD_L(jit_Z_LVAL(jit, op1_addr), ref);
5501+
ref = ir_MOD_L(op1_ref, ref);
55005502

55015503
if (zero_path) {
55025504
ir_MERGE_WITH(zero_path);

0 commit comments

Comments
 (0)