[php-src] PR #24209: GH-24206: Tracing JIT loses loop-carried CV when its loop PHI is reloaded from memory

From: Date: Thu, 08 Oct 2026 22:27:20 +0000
Subject: [php-src] PR #24209: GH-24206: Tracing JIT loses loop-carried CV when its loop PHI is reloaded from memory
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39275@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24209 Author: ndossche > exit_5: 0040/0038/11 CV0($string):string CV1($startOffset):int(type_only) > CV3($strlen):int(r12:1) CV4($charPos):int(type_only) CV5($foundChars):int(type_only) > CV6($invalid):bool CV7($i):int(rcx:1) CV8($char):string CV9($size):int(rdx:1) > CV10($j):int(type_only) Inside the JITted loop, $size is in a register. At the start of each loop iteration, the compiled code doesn't take $size from that register. It reads $size from memory. That's because $size from before the loop isn't a single type ([null, long]) so it cannot be in a register _there_. But at the _end_ of the loop iteration, right when it backedges, JIT doesn't write this back from register into memory... It's kept type-only.

« previous php.git-pulls (#39275) next »