aboutsummaryrefslogtreecommitdiff
path: root/src/lj_opt_fold.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_opt_fold.c')
-rw-r--r--src/lj_opt_fold.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index bdaa0e4f..83972db9 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -1958,14 +1958,15 @@ LJFOLDF(abc_fwd)
1958LJFOLD(ABC any KINT) 1958LJFOLD(ABC any KINT)
1959LJFOLDF(abc_k) 1959LJFOLDF(abc_k)
1960{ 1960{
1961 PHIBARRIER(fleft);
1961 if (LJ_LIKELY(J->flags & JIT_F_OPT_ABC)) { 1962 if (LJ_LIKELY(J->flags & JIT_F_OPT_ABC)) {
1962 IRRef ref = J->chain[IR_ABC]; 1963 IRRef ref = J->chain[IR_ABC];
1963 IRRef asize = fins->op1; 1964 IRRef asize = fins->op1;
1964 while (ref > asize) { 1965 while (ref > asize) {
1965 IRIns *ir = IR(ref); 1966 IRIns *ir = IR(ref);
1966 if (ir->op1 == asize && irref_isk(ir->op2)) { 1967 if (ir->op1 == asize && irref_isk(ir->op2)) {
1967 int32_t k = IR(ir->op2)->i; 1968 uint32_t k = (uint32_t)IR(ir->op2)->i;
1968 if (fright->i > k) 1969 if ((uint32_t)fright->i > k)
1969 ir->op2 = fins->op2; 1970 ir->op2 = fins->op2;
1970 return DROPFOLD; 1971 return DROPFOLD;
1971 } 1972 }