diff options
author | Mike Pall <mike> | 2019-05-09 11:33:03 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2019-05-09 11:33:03 +0200 |
commit | d4c0c6e17ef7edf1f2893bc807746b80612e63e9 (patch) | |
tree | 4ceac472b6780073c25ad7d14bc7ea81384a0ff1 | |
parent | 9bd5a722bee2ee2c5b159a89937778b81be49915 (diff) | |
download | luajit-d4c0c6e17ef7edf1f2893bc807746b80612e63e9.tar.gz luajit-d4c0c6e17ef7edf1f2893bc807746b80612e63e9.tar.bz2 luajit-d4c0c6e17ef7edf1f2893bc807746b80612e63e9.zip |
Fix TNEW load forwarding with instable types.
-rw-r--r-- | src/lj_opt_mem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_opt_mem.c b/src/lj_opt_mem.c index 9f714056..f7833654 100644 --- a/src/lj_opt_mem.c +++ b/src/lj_opt_mem.c | |||
@@ -179,7 +179,8 @@ static TRef fwd_ahload(jit_State *J, IRRef xref) | |||
179 | } | 179 | } |
180 | ref = store->prev; | 180 | ref = store->prev; |
181 | } | 181 | } |
182 | lua_assert(ir->o != IR_TNEW || irt_isnil(fins->t)); | 182 | if (ir->o == IR_TNEW && !irt_isnil(fins->t)) |
183 | return 0; /* Type instability in loop-carried dependency. */ | ||
183 | if (irt_ispri(fins->t)) { | 184 | if (irt_ispri(fins->t)) { |
184 | return TREF_PRI(irt_type(fins->t)); | 185 | return TREF_PRI(irt_type(fins->t)); |
185 | } else if (irt_isnum(fins->t) || (LJ_DUALNUM && irt_isint(fins->t)) || | 186 | } else if (irt_isnum(fins->t) || (LJ_DUALNUM && irt_isint(fins->t)) || |