From: Dmitry Stogov Date: Wed, 11 Nov 2020 14:34:46 +0000 (+0300) Subject: Fixed incorrect invariant guard motion X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d2d42b2681b97de654b02c0edbac87dc94e0ce5;p=php Fixed incorrect invariant guard motion --- diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 85f09d3275..41e81b63f7 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2197,7 +2197,8 @@ propagate_arg: ssa_var_info[phi->sources[0]].type = MAY_BE_GUARD | (t & t0); } if ((t1 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) != (t & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF))) { - if (is_checked_guard(tssa, ssa_opcodes, phi->sources[1], phi->ssa_var)) { + if (((t & t1) & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) != 0 + && is_checked_guard(tssa, ssa_opcodes, phi->sources[1], phi->ssa_var)) { ssa_var_info[phi->sources[1]].type = MAY_BE_GUARD | (t & t1); ssa_var_info[phi->ssa_var].type = t & ~MAY_BE_GUARD; }