Skip to content

Commit 099ffc2

Browse files
committed
BIND_GLOBAL and BIND_STATIC don't use value of the first operand
1 parent 9e77d5a commit 099ffc2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/opcache/Optimizer/zend_ssa.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ static zend_always_inline zend_ssa_phi* zend_ssa_next_use_phi(const zend_ssa *ss
213213

214214
static zend_always_inline zend_bool zend_ssa_is_no_val_use(const zend_op *opline, const zend_ssa_op *ssa_op, int var)
215215
{
216-
if (opline->opcode == ZEND_ASSIGN || opline->opcode == ZEND_UNSET_CV) {
216+
if (opline->opcode == ZEND_ASSIGN
217+
|| opline->opcode == ZEND_UNSET_CV
218+
|| opline->opcode == ZEND_BIND_GLOBAL
219+
|| opline->opcode == ZEND_BIND_STATIC) {
217220
return ssa_op->op1_use == var && ssa_op->op2_use != var;
218221
}
219222
if (opline->opcode == ZEND_FE_FETCH_R || opline->opcode == ZEND_FE_FETCH_RW) {

0 commit comments

Comments
 (0)