From f722512c4ad02cb0696ea8ea776aef5a709dcdbb Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 28 Sep 2020 23:54:28 +0300 Subject: [PATCH] Move invariant type guard out of loop --- ext/opcache/jit/zend_jit_trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.40.0