[php-src] PR #22673: ir/aarch64: emit cbz/cbnz instead of cmp + b.ne
| From: | henderkes | Date: | Fri, 10 Jul 2026 13:14:08 +0000 |
| Subject: | [php-src] PR #22673: ir/aarch64: emit cbz/cbnz instead of cmp + b.ne | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36951@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22673
Author: henderkes
ir_emit_if_int used to emit
```asm
cmp w1, #0
b.ne >refcount_path
```
and now emits
```asm
cbnz w1, >refcount_path
```
for
```php
function f($x) {
$s = "s" . $x; // $s is a refcounted string
unset($s); // FREE: DELREF + maybe destroy, only if refcounted
}
```
LLM disclosure: this was fully found and done by Fable, all I did was verify correctness. ~ +1% in
jit on phpbench for both Clang and GCC. No non-jit impact for obvious reasons.