File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -3059,7 +3059,9 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace
3059
3059
3060
3060
while (phi ) {
3061
3061
if (intervals [phi -> ssa_var ]) {
3062
- if (intervals [phi -> sources [1 ]]) {
3062
+ if (intervals [phi -> sources [1 ]]
3063
+ && (ssa -> var_info [phi -> sources [1 ]].type & MAY_BE_ANY ) ==
3064
+ (ssa -> var_info [phi -> ssa_var ].type & MAY_BE_ANY )) {
3063
3065
intervals [phi -> sources [1 ]]-> hint = intervals [phi -> ssa_var ];
3064
3066
}
3065
3067
}
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Register Alloction 005: Incorrect double/long register hinting
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.file_update_protection=0
7
+ opcache.jit_buffer_size=1M
8
+ --FILE--
9
+ <?php
10
+ function test () {
11
+ $ j = 0 ;
12
+ for ($ i = 1 ; $ i < 10 ; $ i ++) {
13
+ $ i = 0.0 ;
14
+ $ j ++;
15
+ if ($ j > 10 ) break ;
16
+ }
17
+ }
18
+ test ();
19
+ ?>
20
+ DONE
21
+ --EXPECT--
22
+ DONE
You can’t perform that action at this time.
0 commit comments