mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Drop pi nodes for both old/new pred in replace_predecessor
This commit is contained in:
commit
e5c2ad45dd
@ -607,7 +607,7 @@ static void replace_predecessor(zend_ssa *ssa, int block_id, int old_pred, int n
|
|||||||
/* Also remove the corresponding phi node entries */
|
/* Also remove the corresponding phi node entries */
|
||||||
for (phi = ssa->blocks[block_id].phis; phi; phi = phi->next) {
|
for (phi = ssa->blocks[block_id].phis; phi; phi = phi->next) {
|
||||||
if (phi->pi >= 0) {
|
if (phi->pi >= 0) {
|
||||||
if (phi->pi == old_pred) {
|
if (phi->pi == old_pred || phi->pi == new_pred) {
|
||||||
zend_ssa_rename_var_uses(
|
zend_ssa_rename_var_uses(
|
||||||
ssa, phi->ssa_var, phi->sources[0], /* update_types */ 0);
|
ssa, phi->ssa_var, phi->sources[0], /* update_types */ 0);
|
||||||
zend_ssa_remove_phi(ssa, phi);
|
zend_ssa_remove_phi(ssa, phi);
|
||||||
|
@ -7,6 +7,11 @@ function test(bool $a, bool $b) {
|
|||||||
if ($a && $byte > 0 && $b) {}
|
if ($a && $byte > 0 && $b) {}
|
||||||
unknown($byte);
|
unknown($byte);
|
||||||
}
|
}
|
||||||
|
function test2() {
|
||||||
|
foreach (0 as $v) {
|
||||||
|
$v ??= 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
===DONE===
|
===DONE===
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
|
Loading…
Reference in New Issue
Block a user