[GIT-PULLS] [php-src] PR #22673: ir/aarch64: emit cbz/cbnz instead of cmp + b.ne
[email protected] (henderkes)
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <Z1fjZuPj4inncdFOGOukrHCRjlEwgvVwmlgUawV8aqU@main.internal.php.net> |
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.