From: Dmitry Stogov Date: Wed, 27 May 2020 06:59:12 +0000 (+0300) Subject: Fixed JIT for ext/opcache/tests/jit/cmp_004.phpt with opcache.jit=1201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e5247275afe297e0f53ab8d620f88227e3cb977;p=php Fixed JIT for ext/opcache/tests/jit/cmp_004.phpt with opcache.jit=1201 --- diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index b589c2e3f5..81429086d8 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -2941,7 +2941,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op break; case ZEND_JMPZ: case ZEND_JMPNZ: - if (opline > op_array->opcodes && + if (opline > op_array->opcodes + ssa->cfg.blocks[b].start && ((opline-1)->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { /* smart branch */ if (!zend_jit_cond_jmp(&dasm_state, opline + 1, ssa->cfg.blocks[b].successors[0])) {