Ensure full init of IR_NOP instructions.

This commit is contained in:
Mike Pall
2020-10-12 15:40:28 +02:00
parent e8ec6fe996
commit de6b1a11dd
4 changed files with 15 additions and 25 deletions

View File

@@ -352,10 +352,7 @@ TRef LJ_FASTCALL lj_opt_dse_ahstore(jit_State *J)
goto doemit; /* No elimination possible. */
/* Remove redundant store from chain and replace with NOP. */
*refp = store->prev;
store->o = IR_NOP;
store->t.irt = IRT_NIL;
store->op1 = store->op2 = 0;
store->prev = 0;
lj_ir_nop(store);
/* Now emit the new store instead. */
}
goto doemit;
@@ -456,10 +453,7 @@ TRef LJ_FASTCALL lj_opt_dse_ustore(jit_State *J)
goto doemit; /* No elimination possible. */
/* Remove redundant store from chain and replace with NOP. */
*refp = store->prev;
store->o = IR_NOP;
store->t.irt = IRT_NIL;
store->op1 = store->op2 = 0;
store->prev = 0;
lj_ir_nop(store);
if (ref+1 < J->cur.nins &&
store[1].o == IR_OBAR && store[1].op1 == xref) {
IRRef1 *bp = &J->chain[IR_OBAR];
@@ -468,10 +462,7 @@ TRef LJ_FASTCALL lj_opt_dse_ustore(jit_State *J)
bp = &obar->prev;
/* Remove OBAR, too. */
*bp = obar->prev;
obar->o = IR_NOP;
obar->t.irt = IRT_NIL;
obar->op1 = obar->op2 = 0;
obar->prev = 0;
lj_ir_nop(obar);
}
/* Now emit the new store instead. */
}
@@ -562,10 +553,7 @@ TRef LJ_FASTCALL lj_opt_dse_fstore(jit_State *J)
goto doemit; /* No elimination possible. */
/* Remove redundant store from chain and replace with NOP. */
*refp = store->prev;
store->o = IR_NOP;
store->t.irt = IRT_NIL;
store->op1 = store->op2 = 0;
store->prev = 0;
lj_ir_nop(store);
/* Now emit the new store instead. */
}
goto doemit;
@@ -816,10 +804,7 @@ TRef LJ_FASTCALL lj_opt_dse_xstore(jit_State *J)
goto doemit; /* No elimination possible. */
/* Remove redundant store from chain and replace with NOP. */
*refp = store->prev;
store->o = IR_NOP;
store->t.irt = IRT_NIL;
store->op1 = store->op2 = 0;
store->prev = 0;
lj_ir_nop(store);
/* Now emit the new store instead. */
}
goto doemit;