diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2020-10-20 23:37:19 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2020-10-20 23:37:19 +0300 |
| commit | a1cac4fefcb90f80c7760fbbaff2a90ad0ae0b2c (patch) | |
| tree | 6c607913b631a64414a345abdffc30335042e510 | |
| parent | 0ac810bbc542aff06db75832a100640a0efb39d4 (diff) | |
| download | php-git-a1cac4fefcb90f80c7760fbbaff2a90ad0ae0b2c.tar.gz | |
Eliminate dead type store
| -rw-r--r-- | ext/opcache/jit/zend_jit_x86.dasc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 53dbb9b225..9f2b934c03 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -11758,7 +11758,11 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst, | ZVAL_COPY_VALUE_V res_addr, -1, val_addr, res_info, ZREG_R0, ZREG_R1 if (Z_MODE(res_addr) == IS_MEM_ZVAL) { if (type < IS_STRING) { - | SET_ZVAL_TYPE_INFO res_addr, type + if (Z_REG(res_addr) != ZREG_FP || + JIT_G(current_frame) == NULL || + STACK_MEM_TYPE(JIT_G(current_frame)->stack, EX_VAR_TO_NUM(Z_OFFSET(res_addr))) != type) { + | SET_ZVAL_TYPE_INFO res_addr, type + } } else { | SET_ZVAL_TYPE_INFO res_addr, edx if (!result_avoid_refcounting) { @@ -12825,7 +12829,11 @@ static int zend_jit_fetch_obj(dasm_State **Dst, | // ZVAL_COPY | ZVAL_COPY_VALUE_V res_addr, -1, val_addr, res_info, ZREG_R0, ZREG_R1 if (type < IS_STRING) { - | SET_ZVAL_TYPE_INFO res_addr, type + if (Z_REG(res_addr) != ZREG_FP || + JIT_G(current_frame) == NULL || + STACK_MEM_TYPE(JIT_G(current_frame)->stack, EX_VAR_TO_NUM(Z_OFFSET(res_addr))) != type) { + | SET_ZVAL_TYPE_INFO res_addr, type + } } else { | SET_ZVAL_TYPE_INFO res_addr, edx if (!result_avoid_refcounting) { |
