summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2020-10-21 16:03:28 +0300
committerDmitry Stogov <dmitry@zend.com>2020-10-21 16:03:28 +0300
commit9efb258fc16d911f54f116358c5cf9f42d02dcd4 (patch)
tree20720a5ea6f232d4eb89f9053ed31bf778862f66
parent3966c0f8a47225486865d7cdef2552f746dd274c (diff)
downloadphp-git-9efb258fc16d911f54f116358c5cf9f42d02dcd4.tar.gz
Eliminate useless mov(s)
-rw-r--r--ext/opcache/jit/zend_jit_x86.dasc8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc
index 9f2b934c03..b5fe131139 100644
--- a/ext/opcache/jit/zend_jit_x86.dasc
+++ b/ext/opcache/jit/zend_jit_x86.dasc
@@ -4962,7 +4962,9 @@ static int zend_jit_long_math_helper(dasm_State **Dst,
| LONG_MATH opcode, result_reg, op2_addr
}
- | SET_ZVAL_LVAL res_addr, Ra(result_reg)
+ if (Z_MODE(res_addr) != IS_REG || Z_REG(res_addr) != result_reg) {
+ | SET_ZVAL_LVAL res_addr, Ra(result_reg)
+ }
if (Z_MODE(res_addr) == IS_MEM_ZVAL) {
if (Z_MODE(op1_addr) != IS_MEM_ZVAL || Z_REG(op1_addr) != Z_REG(res_addr) || Z_OFFSET(op1_addr) != Z_OFFSET(res_addr)) {
if ((res_use_info & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF|MAY_BE_GUARD)) != MAY_BE_LONG) {
@@ -13138,7 +13140,9 @@ static int zend_jit_incdec_obj(dasm_State **Dst,
zend_jit_addr var_addr = prop_addr;
var_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FCARG1a, 0);
- | LOAD_ZVAL_ADDR FCARG1a, prop_addr
+ if (Z_REG(prop_addr) != ZREG_FCARG1a || Z_OFFSET(prop_addr) != 0) {
+ | LOAD_ZVAL_ADDR FCARG1a, prop_addr
+ }
| IF_NOT_ZVAL_TYPE var_addr, IS_REFERENCE, >2
| GET_ZVAL_PTR FCARG1a, var_addr