@@ -5392,6 +5392,7 @@ static int zend_jit_long_math_helper(zend_jit_ctx *jit,
5392
5392
op2_range->max >= SIZEOF_ZEND_LONG * 8) {
5393
5393
5394
5394
ir_ref if_wrong, cold_path, ref2, if_ok;
5395
+ ir_ref op1_ref = jit_Z_LVAL(jit, op1_addr);
5395
5396
5396
5397
if_wrong = ir_IF(ir_UGT(ref, ir_CONST_LONG((SIZEOF_ZEND_LONG * 8) - 1)));
5397
5398
ir_IF_TRUE_cold(if_wrong);
@@ -5405,7 +5406,7 @@ static int zend_jit_long_math_helper(zend_jit_ctx *jit,
5405
5406
ref2 = ir_CONST_LONG(0);
5406
5407
cold_path = ir_END();
5407
5408
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);
5409
5410
ir_MERGE_WITH(cold_path);
5410
5411
ref = ir_PHI_2(IR_LONG, ref, ref2);
5411
5412
} else {
@@ -5477,6 +5478,7 @@ static int zend_jit_long_math_helper(zend_jit_ctx *jit,
5477
5478
}
5478
5479
} else {
5479
5480
ir_ref zero_path = 0;
5481
+ ir_ref op1_ref = jit_Z_LVAL(jit, op1_addr);
5480
5482
5481
5483
ref = jit_Z_LVAL(jit, op2_addr);
5482
5484
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,
5496
5498
zero_path = ir_END();
5497
5499
ir_IF_FALSE(if_minus_one);
5498
5500
}
5499
- ref = ir_MOD_L(jit_Z_LVAL(jit, op1_addr) , ref);
5501
+ ref = ir_MOD_L(op1_ref , ref);
5500
5502
5501
5503
if (zero_path) {
5502
5504
ir_MERGE_WITH(zero_path);
0 commit comments