Skip to content

Commit 47d7810

Browse files
committed
Short circuit flf ct eval
1 parent 1e1cffd commit 47d7810

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/Optimizer/sccp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,11 @@ static void sccp_visit_instr(scdf_ctx *scdf, zend_op *opline, zend_ssa_op *ssa_o
17171717
case ZEND_FRAMELESS_ICALL_1:
17181718
case ZEND_FRAMELESS_ICALL_2:
17191719
case ZEND_FRAMELESS_ICALL_3: {
1720+
/* We already know it can't be evaluated, don't bother checking again */
1721+
if (ssa_op->result_def < 0 || IS_BOT(&ctx->values[ssa_op->result_def])) {
1722+
break;
1723+
}
1724+
17201725
if (!ctx->call_map) {
17211726
SET_RESULT_BOT(result);
17221727
break;

0 commit comments

Comments
 (0)