File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -3540,11 +3540,14 @@ static void _zend_jit_fix_merges(zend_jit_ctx *jit)
3540
3540
phi->op = IR_COPY;
3541
3541
phi->op1 = phi->op2;
3542
3542
phi->op2 = 1;
3543
+ phi->inputs_count = 0;
3544
+ } else {
3545
+ phi->inputs_count = k + 1;
3543
3546
}
3544
3547
n2 = 1 + ((n + 1) >> 2);
3545
3548
k2 = 1 + ((k + 1) >> 2);
3546
3549
while (k2 != n2) {
3547
- (insn +k2)->optx = IR_NOP;
3550
+ (phi +k2)->optx = IR_NOP;
3548
3551
k2++;
3549
3552
}
3550
3553
phi += 1 + ((n + 1) >> 2);
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ JIT LOOP: 003 Incorrect dead IR edge elimination
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.jit_buffer_size=32M
7
+ --FILE--
8
+ <?php
9
+ function () {
10
+ $ a = 0 ;
11
+ while (y) {
12
+ $ a &= $ y & $ y ;
13
+ if (y) die &("" );
14
+ }
15
+ };
16
+ ?>
17
+ DONE
18
+ --EXPECT--
19
+ DONE
You can’t perform that action at this time.
0 commit comments