aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2023-09-22 21:04:22 +0200
committerMike Pall <mike>2023-09-22 21:04:22 +0200
commitf72c19e482b6f918b7cf42b0436e2b117d160a29 (patch)
tree1da5b9b9bc7d1cea193812ce01dba2295c821cf9
parentaa6b15c1a8922848bd6f596ba384824ca3fe0f5f (diff)
downloadluajit-f72c19e482b6f918b7cf42b0436e2b117d160a29.tar.gz
luajit-f72c19e482b6f918b7cf42b0436e2b117d160a29.tar.bz2
luajit-f72c19e482b6f918b7cf42b0436e2b117d160a29.zip
Maintain chain invariant in DCE.
Thanks to Peter Cawley. #1094
-rw-r--r--src/lj_opt_dce.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_opt_dce.c b/src/lj_opt_dce.c
index c6c3e1bc..e6fcc552 100644
--- a/src/lj_opt_dce.c
+++ b/src/lj_opt_dce.c
@@ -44,12 +44,12 @@ static void dce_propagate(jit_State *J)
44 IRIns *ir = IR(ins); 44 IRIns *ir = IR(ins);
45 if (irt_ismarked(ir->t)) { 45 if (irt_ismarked(ir->t)) {
46 irt_clearmark(ir->t); 46 irt_clearmark(ir->t);
47 pchain[ir->o] = &ir->prev;
48 } else if (!ir_sideeff(ir)) { 47 } else if (!ir_sideeff(ir)) {
49 *pchain[ir->o] = ir->prev; /* Reroute original instruction chain. */ 48 *pchain[ir->o] = ir->prev; /* Reroute original instruction chain. */
50 lj_ir_nop(ir); 49 lj_ir_nop(ir);
51 continue; 50 continue;
52 } 51 }
52 pchain[ir->o] = &ir->prev;
53 if (ir->op1 >= REF_FIRST) irt_setmark(IR(ir->op1)->t); 53 if (ir->op1 >= REF_FIRST) irt_setmark(IR(ir->op1)->t);
54 if (ir->op2 >= REF_FIRST) irt_setmark(IR(ir->op2)->t); 54 if (ir->op2 >= REF_FIRST) irt_setmark(IR(ir->op2)->t);
55 } 55 }