aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2017-11-08 12:53:05 +0100
committerMike Pall <mike>2017-11-08 12:53:05 +0100
commit9f0caad0e43f97a4613850b3874b851cb1bc301d (patch)
treec9aa8cb4bab699d52c2fdb0e4fa4341d10d98123
parent0c0e7b168ea147866835954267c151ef789f64fb (diff)
downloadluajit-9f0caad0e43f97a4613850b3874b851cb1bc301d.tar.gz
luajit-9f0caad0e43f97a4613850b3874b851cb1bc301d.tar.bz2
luajit-9f0caad0e43f97a4613850b3874b851cb1bc301d.zip
Fix FOLD rule for strength reduction of widening.
Reported by Matthew Burk.
-rw-r--r--src/lj_opt_fold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 3d0e35a6..5dc7ae3d 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -1052,7 +1052,7 @@ LJFOLDF(simplify_conv_sext)
1052 if (ref == J->scev.idx) { 1052 if (ref == J->scev.idx) {
1053 IRRef lo = J->scev.dir ? J->scev.start : J->scev.stop; 1053 IRRef lo = J->scev.dir ? J->scev.start : J->scev.stop;
1054 lua_assert(irt_isint(J->scev.t)); 1054 lua_assert(irt_isint(J->scev.t));
1055 if (lo && IR(lo)->i + ofs >= 0) { 1055 if (lo && IR(lo)->o == IR_KINT && IR(lo)->i + ofs >= 0) {
1056 ok_reduce: 1056 ok_reduce:
1057#if LJ_TARGET_X64 1057#if LJ_TARGET_X64
1058 /* Eliminate widening. All 32 bit ops do an implicit zero-extension. */ 1058 /* Eliminate widening. All 32 bit ops do an implicit zero-extension. */