Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ext/opcache/jit/zend_jit_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,8 +1332,16 @@ static void zend_jit_def_reg(zend_jit_ctx *jit, zend_jit_addr addr, ir_ref val)
ZEND_ASSERT(jit->ra && jit->ra[var].ref == IR_NULL);

/* Negative "var" has special meaning for IR */
if (val > 0 && !zend_jit_spilling_may_cause_conflict(jit, var, val)) {
val = ir_bind(&jit->ctx, -EX_NUM_TO_VAR(jit->ssa->vars[var].var), val);
if (val > 0) {
if (jit->ctx.binding) {
ir_ref old = ir_binding_find(&jit->ctx, val);
if (old && old != -EX_NUM_TO_VAR(jit->ssa->vars[var].var)) {
val = ir_emit2(&jit->ctx, IR_OPT(IR_COPY, jit->ctx.ir_base[val].type), val, 1);
}
}
if (!zend_jit_spilling_may_cause_conflict(jit, var, val)) {
val = ir_bind(&jit->ctx, -EX_NUM_TO_VAR(jit->ssa->vars[var].var), val);
}
}
jit->ra[var].ref = val;

Expand Down
2 changes: 1 addition & 1 deletion ext/opcache/jit/zend_jit_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -6902,7 +6902,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par

ssa->var_info[j].type &= ~MAY_BE_GUARD;
op_type = concrete_type(ssa->var_info[j].type);
if (!zend_jit_type_guard(&ctx, opline, EX_NUM_TO_VAR(i), op_type)) {
if (!zend_jit_type_guard(&ctx, NULL, EX_NUM_TO_VAR(i), op_type)) {
goto jit_failure;
}
SET_STACK_TYPE(stack, i, op_type, 1);
Expand Down
Loading