Skip to content

Commit 251e667

Browse files
committed
Prevent incorrect optimization
1 parent ac0da09 commit 251e667

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4083,7 +4083,8 @@ static int zend_jit_math_double_long(dasm_State **Dst,
40834083
{
40844084
zend_reg result_reg;
40854085

4086-
if (zend_is_commutative(opcode)) {
4086+
if (zend_is_commutative(opcode)
4087+
&& (Z_MODE(res_addr) != IS_REG || Z_MODE(op1_addr) != IS_REG || Z_REG(res_addr) != Z_REG(op1_addr))) {
40874088
if (Z_MODE(res_addr) == IS_REG) {
40884089
result_reg = Z_REG(res_addr);
40894090
} else {

0 commit comments

Comments
 (0)