From: Dmitry Stogov Date: Mon, 28 Sep 2020 20:54:28 +0000 (+0300) Subject: Move invariant type guard out of loop X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f722512c4ad02cb0696ea8ea776aef5a709dcdbb;p=php Move invariant type guard out of loop --- diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 102d6a52f6..8057e8131b 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2005,7 +2005,8 @@ propagate_arg: ssa_var_info[phi->ssa_var].type = t & ~MAY_BE_GUARD; } } else if ((t1 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) == (t & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF))) { - if (!(t1 & MAY_BE_GUARD)) { + if (!(t1 & MAY_BE_GUARD) + || is_checked_guard(tssa, ssa_opcodes, phi->sources[1], phi->ssa_var)) { ssa_var_info[phi->ssa_var].type = t & ~MAY_BE_GUARD; ssa_var_info[phi->sources[0]].type = t | MAY_BE_GUARD; }