diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_opt_sink.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lj_opt_sink.c b/src/lj_opt_sink.c index 975ee831..49e13784 100644 --- a/src/lj_opt_sink.c +++ b/src/lj_opt_sink.c | |||
@@ -166,8 +166,8 @@ static void sink_remark_phi(jit_State *J) | |||
166 | /* Sweep instructions and tag sunken allocations and stores. */ | 166 | /* Sweep instructions and tag sunken allocations and stores. */ |
167 | static void sink_sweep_ins(jit_State *J) | 167 | static void sink_sweep_ins(jit_State *J) |
168 | { | 168 | { |
169 | IRIns *ir, *irfirst = IR(J->cur.nk); | 169 | IRIns *ir, *irbase = IR(REF_BASE); |
170 | for (ir = IR(J->cur.nins-1) ; ir >= irfirst; ir--) { | 170 | for (ir = IR(J->cur.nins-1) ; ir >= irbase; ir--) { |
171 | switch (ir->o) { | 171 | switch (ir->o) { |
172 | case IR_ASTORE: case IR_HSTORE: case IR_FSTORE: case IR_XSTORE: { | 172 | case IR_ASTORE: case IR_HSTORE: case IR_FSTORE: case IR_XSTORE: { |
173 | IRIns *ira = sink_checkalloc(J, ir); | 173 | IRIns *ira = sink_checkalloc(J, ir); |
@@ -217,6 +217,10 @@ static void sink_sweep_ins(jit_State *J) | |||
217 | break; | 217 | break; |
218 | } | 218 | } |
219 | } | 219 | } |
220 | for (ir = IR(J->cur.nk); ir < irbase; ir++) { | ||
221 | irt_clearmark(ir->t); | ||
222 | ir->prev = REGSP_INIT; | ||
223 | } | ||
220 | } | 224 | } |
221 | 225 | ||
222 | /* Allocation sinking and store sinking. | 226 | /* Allocation sinking and store sinking. |