Skip to content

Commit 5885b94

Browse files
committed
Fix function JIT for Wordpress unit tests
1 parent bac1ed6 commit 5885b94

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/opcache/jit/zend_jit_ir.c

+5
Original file line numberDiff line numberDiff line change
@@ -3558,6 +3558,8 @@ static void jit_IF_TRUE_FALSE_ex(zend_jit_ctx *jit, ir_ref if_ref, ir_ref true_b
35583558
}
35593559
}
35603560

3561+
static void zend_jit_case_start(zend_jit_ctx *jit, int switch_b, int case_b, ir_ref switch_ref);
3562+
35613563
static void _zend_jit_add_predecessor_ref(zend_jit_ctx *jit, int b, int pred, ir_ref ref)
35623564
{
35633565
int i, *p;
@@ -3580,6 +3582,9 @@ static void _zend_jit_add_predecessor_ref(zend_jit_ctx *jit, int b, int pred, ir
35803582
} else if (jit->ctx.ir_base[ref].op == IR_IF) {
35813583
jit_IF_TRUE_FALSE_ex(jit, ref, b);
35823584
ref = ir_LOOP_END();
3585+
} else if (jit->ctx.ir_base[ref].op == IR_SWITCH) {
3586+
zend_jit_case_start(jit, pred, b, ref);
3587+
ref = ir_LOOP_END();
35833588
} else if (jit->ctx.ir_base[ref].op == IR_UNREACHABLE) {
35843589
ir_BEGIN(ref);
35853590
ref = ir_LOOP_END();

0 commit comments

Comments
 (0)