From bbbccf0811745c50cf9aca656104dab56bce5d32 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 30 Jul 2020 01:32:23 +0300 Subject: [PATCH] Force type update if the previous value was in register only --- ext/opcache/jit/zend_jit_x86.dasc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index efb0b7f682..5c827f4b99 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -8003,6 +8003,13 @@ static int zend_jit_assign(dasm_State **Dst, const zend_op *opline, const zend_o } } + if (Z_MODE(op1_addr) != IS_REG + && Z_MODE(op1_use_addr) == IS_REG + && !Z_LOAD(op1_use_addr) + && !Z_STORE(op1_use_addr)) { + /* Force type update */ + op1_info |= MAY_BE_UNDEF; + } if (!zend_jit_assign_to_variable(Dst, opline, op_array, op1_addr, op1_info, op1_def_info, opline->op2_type, opline->op2, op2_addr, op2_info, res_addr, may_throw)) { return 0; -- 2.50.1