mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fold KPTR + offset in SPLIT pass.
This commit is contained in:
parent
0ecdff43e8
commit
d4d9807f45
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user