mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Proper check for successors count
This commit is contained in:
parent
ea8c004a15
commit
54bc7b576c
@ -428,13 +428,13 @@ static int simplify_jumps(zend_ssa *ssa, zend_op_array *op_array) {
|
|||||||
switch (opline->opcode) {
|
switch (opline->opcode) {
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
case ZEND_JMPNZ_EX:
|
case ZEND_JMPNZ_EX:
|
||||||
if (block->successors[1] < 0 && block->successors[0] != block_num + 1) {
|
if (block->successors_count == 1 && block->successors[0] != block_num + 1) {
|
||||||
opline->opcode = ZEND_BOOL;
|
opline->opcode = ZEND_BOOL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZEND_JMP_SET:
|
case ZEND_JMP_SET:
|
||||||
case ZEND_COALESCE:
|
case ZEND_COALESCE:
|
||||||
if (block->successors[1] < 0 && block->successors[0] != block_num + 1) {
|
if (block->successors_count == 1 && block->successors[0] != block_num + 1) {
|
||||||
opline->opcode = ZEND_QM_ASSIGN;
|
opline->opcode = ZEND_QM_ASSIGN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user