mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Remove an incorrect JMPZNZ optimization
This is already skipped for TMP/VAR, but also needs to be skipped for CV, because we need to insert CHECK_VAR in that case, if we're being pedantic. That leaves us with CONST as the only case we can handle, which is already covered by constant folding. This optimization never actually triggers in our tests, so it's not a big loss.
This commit is contained in:
parent
a0ba10436c
commit
7d2f2a1005
1 changed files with 0 additions and 9 deletions
|
@ -340,15 +340,6 @@ optimize_jmpznz:
|
|||
opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, target);
|
||||
}
|
||||
|
||||
if (ZEND_OP2_JMP_ADDR(opline) == target &&
|
||||
!(opline->op1_type & (IS_VAR|IS_TMP_VAR))) {
|
||||
/* JMPZNZ(?,L,L) -> JMP(L) */
|
||||
opline->opcode = ZEND_JMP;
|
||||
ZEND_SET_OP_JMP_ADDR(opline, opline->op1, target);
|
||||
SET_UNUSED(opline->op1);
|
||||
SET_UNUSED(opline->op2);
|
||||
opline->extended_value = 0;
|
||||
}
|
||||
/* Don't convert JMPZNZ back to JMPZ/JMPNZ, because the
|
||||
following JMP is not removed yet. */
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue