summaryrefslogtreecommitdiff
path: root/src/lj_opt_mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_opt_mem.c')
-rw-r--r--src/lj_opt_mem.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lj_opt_mem.c b/src/lj_opt_mem.c
index cad85bb7..211c329a 100644
--- a/src/lj_opt_mem.c
+++ b/src/lj_opt_mem.c
@@ -675,7 +675,8 @@ TRef LJ_FASTCALL lj_opt_fwd_xload(jit_State *J)
675 /* Search for conflicting stores. */ 675 /* Search for conflicting stores. */
676 ref = J->chain[IR_XSTORE]; 676 ref = J->chain[IR_XSTORE];
677retry: 677retry:
678 while (ref > xref) { 678 if (J->chain[IR_CALLXS] > lim) lim = J->chain[IR_CALLXS];
679 while (ref > lim) {
679 IRIns *store = IR(ref); 680 IRIns *store = IR(ref);
680 switch (aa_xref(J, xr, fins, store)) { 681 switch (aa_xref(J, xr, fins, store)) {
681 case ALIAS_NO: break; /* Continue searching. */ 682 case ALIAS_NO: break; /* Continue searching. */
@@ -732,10 +733,12 @@ TRef LJ_FASTCALL lj_opt_dse_xstore(jit_State *J)
732{ 733{
733 IRRef xref = fins->op1; 734 IRRef xref = fins->op1;
734 IRIns *xr = IR(xref); 735 IRIns *xr = IR(xref);
736 IRRef lim = xref; /* Search limit. */
735 IRRef val = fins->op2; /* Stored value reference. */ 737 IRRef val = fins->op2; /* Stored value reference. */
736 IRRef1 *refp = &J->chain[IR_XSTORE]; 738 IRRef1 *refp = &J->chain[IR_XSTORE];
737 IRRef ref = *refp; 739 IRRef ref = *refp;
738 while (ref > xref) { /* Search for redundant or conflicting stores. */ 740 if (J->chain[IR_CALLXS] > lim) lim = J->chain[IR_CALLXS];
741 while (ref > lim) { /* Search for redundant or conflicting stores. */
739 IRIns *store = IR(ref); 742 IRIns *store = IR(ref);
740 switch (aa_xref(J, xr, fins, store)) { 743 switch (aa_xref(J, xr, fins, store)) {
741 case ALIAS_NO: 744 case ALIAS_NO: