mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix ABC elimination.
This commit is contained in:
parent
bb5dfbb034
commit
a6c34b85f7
@ -1060,7 +1060,7 @@ static void rec_idx_abc(jit_State *J, TRef asizeref, TRef ikey, uint32_t asize)
|
|||||||
lua_assert(irt_isint(J->scev.t) && ir->o == IR_SLOAD);
|
lua_assert(irt_isint(J->scev.t) && ir->o == IR_SLOAD);
|
||||||
stop = numberVint(&(J->L->base - J->baseslot)[ir->op1 + FORL_STOP]);
|
stop = numberVint(&(J->L->base - J->baseslot)[ir->op1 + FORL_STOP]);
|
||||||
/* Runtime value for stop of loop is within bounds? */
|
/* Runtime value for stop of loop is within bounds? */
|
||||||
if ((int64_t)stop + ofs < (int64_t)asize) {
|
if ((uint64_t)stop + ofs < (uint64_t)asize) {
|
||||||
/* Emit invariant bounds check for stop. */
|
/* Emit invariant bounds check for stop. */
|
||||||
emitir(IRTG(IR_ABC, IRT_P32), asizeref, ofs == 0 ? J->scev.stop :
|
emitir(IRTG(IR_ABC, IRT_P32), asizeref, ofs == 0 ? J->scev.stop :
|
||||||
emitir(IRTI(IR_ADD), J->scev.stop, ofsref));
|
emitir(IRTI(IR_ADD), J->scev.stop, ofsref));
|
||||||
|
Loading…
Reference in New Issue
Block a user