diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-01 12:22:56 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-01 12:25:00 +0200 |
| commit | 37612936a1ede4e656514dc62c42a5e42e976046 (patch) | |
| tree | f64dd1535d6ad176a39aa3666ac740a5c67adc35 /ext/opcache | |
| parent | 9560e3ba7ab64e3fb9815253e33095d11e83e978 (diff) | |
| download | php-git-37612936a1ede4e656514dc62c42a5e42e976046.tar.gz | |
Fix pi node removal when removing predecessor
We can't just remove the uses, we need to replace uses.
The test case only fails on master with SSA integrity violations,
but I believe the root issue also existed previously.
Diffstat (limited to 'ext/opcache')
| -rw-r--r-- | ext/opcache/Optimizer/zend_ssa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/opcache/Optimizer/zend_ssa.c b/ext/opcache/Optimizer/zend_ssa.c index fdc383128b..89dfe57914 100644 --- a/ext/opcache/Optimizer/zend_ssa.c +++ b/ext/opcache/Optimizer/zend_ssa.c @@ -1388,7 +1388,7 @@ void zend_ssa_remove_predecessor(zend_ssa *ssa, int from, int to) /* {{{ */ for (phi = next_ssa_block->phis; phi; phi = phi->next) { if (phi->pi >= 0) { if (phi->pi == from) { - zend_ssa_remove_uses_of_var(ssa, phi->ssa_var); + zend_ssa_rename_var_uses(ssa, phi->ssa_var, phi->sources[0], /* update_types */ 0); zend_ssa_remove_phi(ssa, phi); } } else { |
