1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
  JIT: Fixed incorrect double/long register hinting
This commit is contained in:
Dmitry Stogov
2021-10-08 15:47:21 +03:00
2 changed files with 25 additions and 1 deletions
+3 -1
View File
@@ -3059,7 +3059,9 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace
while (phi) {
if (intervals[phi->ssa_var]) {
if (intervals[phi->sources[1]]) {
if (intervals[phi->sources[1]]
&& (ssa->var_info[phi->sources[1]].type & MAY_BE_ANY) ==
(ssa->var_info[phi->ssa_var].type & MAY_BE_ANY)) {
intervals[phi->sources[1]]->hint = intervals[phi->ssa_var];
}
}
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Register Alloction 005: Incorrect double/long register hinting
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php
function test() {
$j = 0;
for ($i = 1; $i < 10; $i++) {
$i = 0.0;
$j++;
if ($j > 10) break;
}
}
test();
?>
DONE
--EXPECT--
DONE