IRRef lim = xref; /* Search limit. */
IRRef ref;
+ if (IR(xr->op1)->o != IR_FLOAD) /* Varargs have no corresponding stores. */
+ goto cselim;
+
/* Search for conflicting stores. */
ref = J->chain[fins->o+IRDELTA_L2S];
while (ref > xref) {
IRIns *store = IR(ref);
switch (aa_ahref(J, xr, IR(store->op1))) {
case ALIAS_NO: break; /* Continue searching. */
- case ALIAS_MAY: lim = ref; goto conflict; /* Limit search for load. */
+ case ALIAS_MAY: lim = ref; goto cselim; /* Limit search for load. */
case ALIAS_MUST: return store->op2; /* Store forwarding. */
}
ref = store->prev;
while (ref2 > tab) {
IRIns *newref = IR(ref2);
if (irt_isnum(IR(newref->op2)->t))
- goto conflict;
+ goto cselim;
ref2 = newref->prev;
}
}
IRIns *store = IR(ref);
switch (aa_ahref(J, xr, IR(store->op1))) {
case ALIAS_NO: break; /* Continue searching. */
- case ALIAS_MAY: goto conflict; /* Conflicting store. */
+ case ALIAS_MAY: goto cselim; /* Conflicting store. */
case ALIAS_MUST: return store->op2; /* Store forwarding. */
}
ref = store->prev;
}
}
-conflict:
+cselim:
/* Try to find a matching load. Below the conflicting store, if any. */
ref = J->chain[fins->o];
while (ref > lim) {
IRIns *store = IR(ref);
switch (aa_uref(xr, IR(store->op1))) {
case ALIAS_NO: break; /* Continue searching. */
- case ALIAS_MAY: lim = ref; goto conflict; /* Limit search for load. */
+ case ALIAS_MAY: lim = ref; goto cselim; /* Limit search for load. */
case ALIAS_MUST: return store->op2; /* Store forwarding. */
}
ref = store->prev;
}
-conflict:
+cselim:
/* Try to find a matching load. Below the conflicting store, if any. */
return lj_opt_cselim(J, lim);
}
IRIns *store = IR(ref);
switch (aa_fref(fins, IR(store->op1))) {
case ALIAS_NO: break; /* Continue searching. */
- case ALIAS_MAY: lim = ref; goto conflict; /* Limit search for load. */
+ case ALIAS_MAY: lim = ref; goto cselim; /* Limit search for load. */
case ALIAS_MUST: return store->op2; /* Store forwarding. */
}
ref = store->prev;
return lj_ir_knull(J, IRT_TAB);
}
-conflict:
+cselim:
/* Try to find a matching load. Below the conflicting store, if any. */
return lj_opt_cselim(J, lim);
}