File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,10 @@ static zend_always_inline zend_bool zend_ssa_is_no_val_use(const zend_op *opline
217
217
if (opline -> opcode == ZEND_ASSIGN || opline -> opcode == ZEND_UNSET_CV ) {
218
218
return ssa_op -> op1_use == var && ssa_op -> op2_use != var ;
219
219
}
220
- if (opline -> opcode == ZEND_FE_FETCH_R ) {
220
+ // TODO: Reenable this after changing the SSA structure.
221
+ /*if (opline->opcode == ZEND_FE_FETCH_R) {
221
222
return ssa_op->op2_use == var && ssa_op->op1_use != var;
222
- }
223
+ }*/
223
224
if (ssa_op -> result_use == var && opline -> opcode != ZEND_ADD_ARRAY_ELEMENT ) {
224
225
return ssa_op -> op1_use != var && ssa_op -> op2_use != var ;
225
226
}
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Incorrect DCE with FE_FETCH
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.optimization_level=-1
7
+ --FILE--
8
+ <?php
9
+
10
+ function test () {
11
+ $ a = ["3 " ];
12
+ $ x = 1 ;
13
+ foreach ($ a as $ x ) {
14
+ $ x = 2.0 ;
15
+ }
16
+ var_dump ($ x );
17
+ }
18
+ test ();
19
+
20
+ ?>
21
+ --EXPECT--
22
+ float(2)
You can’t perform that action at this time.
0 commit comments