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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_opt_mem.c b/src/lj_opt_mem.c
index 77a9c0e7..94fc4ad8 100644
--- a/src/lj_opt_mem.c
+++ b/src/lj_opt_mem.c
@@ -519,8 +519,8 @@ int lj_opt_fwd_wasnonnil(jit_State *J, IROpT loadop, IRRef xref)
519 } else if (irt_isnil(store->t)) { /* Must check any nil store. */ 519 } else if (irt_isnil(store->t)) { /* Must check any nil store. */
520 IRRef skref = IR(store->op1)->op2; 520 IRRef skref = IR(store->op1)->op2;
521 IRRef xkref = IR(xref)->op2; 521 IRRef xkref = IR(xref)->op2;
522 /* Same key type MAY alias. */ 522 /* Same key type MAY alias. Need ALOAD check due to multiple int types. */
523 if (irt_sametype(IR(skref)->t, IR(xkref)->t)) { 523 if (loadop == IR_ALOAD || irt_sametype(IR(skref)->t, IR(xkref)->t)) {
524 if (skref == xkref || !irref_isk(skref) || !irref_isk(xkref)) 524 if (skref == xkref || !irref_isk(skref) || !irref_isk(xkref))
525 return 0; /* A nil store with same const key or var key MAY alias. */ 525 return 0; /* A nil store with same const key or var key MAY alias. */
526 /* Different const keys CANNOT alias. */ 526 /* Different const keys CANNOT alias. */