From: Dmitry Stogov Date: Tue, 28 Jul 2020 16:02:08 +0000 (+0300) Subject: Prevent incorrect optimization X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=251e667488fffa39f900c686a7df862aeade176b;p=php Prevent incorrect optimization --- diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 9229b278f1..0c8d847dec 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -4083,7 +4083,8 @@ static int zend_jit_math_double_long(dasm_State **Dst, { zend_reg result_reg; - if (zend_is_commutative(opcode)) { + if (zend_is_commutative(opcode) + && (Z_MODE(res_addr) != IS_REG || Z_MODE(op1_addr) != IS_REG || Z_REG(res_addr) != Z_REG(op1_addr))) { if (Z_MODE(res_addr) == IS_REG) { result_reg = Z_REG(res_addr); } else {