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 @@ -2822,7 +2822,9 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace
2822
2822
2823
2823
while (phi ) {
2824
2824
if (intervals [phi -> ssa_var ]) {
2825
- if (intervals [phi -> sources [1 ]]) {
2825
+ if (intervals [phi -> sources [1 ]]
2826
+ && (ssa -> var_info [phi -> sources [1 ]].type & MAY_BE_ANY ) ==
2827
+ (ssa -> var_info [phi -> ssa_var ].type & MAY_BE_ANY )) {
2826
2828
intervals [phi -> sources [1 ]]-> hint = intervals [phi -> ssa_var ];
2827
2829
}
2828
2830
}
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