[php-src] PR #21596: Fix function JIT JMPNZ smart branch
| From: | iluuu1994 | Date: | Wed, 01 Apr 2026 21:52:18 +0000 |
| Subject: | [php-src] PR #21596: Fix function JIT JMPNZ smart branch | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35463@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21596
Author: iluuu1994
When a smart branch and jump live in separate basic blocks, the JIT can't skip the jitting of
the jump, as it may be reachable through another predecessor. When the smart branch is executed
using zend_jit_handler(), we're manually writing the result of the branch to the given
temporary so that the jump will work as expected. That happens in zend_jit_set_cond().
However, this was only correctly handled for JMPZ branches. The current opline was compared to
opline following the jump, which would set the var to 1 if equal, i.e. the branch was not taken,
meaning var was not zero. For JMPNZ we need to do the opposite.
Adding the "CI: All variations" label to run the function JIT.
Fixes GH-21593