diff --git a/src/lj_opt_split.c b/src/lj_opt_split.c index 186dc8c0..da2c7184 100644 --- a/src/lj_opt_split.c +++ b/src/lj_opt_split.c @@ -184,6 +184,8 @@ static IRRef split_ptr(jit_State *J, IRIns *oir, IRRef ref) IRRef nref = oir[ref].prev; IRIns *ir = IR(nref); int32_t ofs = 4; + if (ir->o == IR_KPTR) + return lj_ir_kptr(J, (char *)ir_kptr(ir) + ofs); if (ir->o == IR_ADD && irref_isk(ir->op2) && !irt_isphi(oir[ref].t)) { /* Reassociate address. */ ofs += IR(ir->op2)->i;