aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_opt_fold.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 470b6d44..e595d512 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -1700,7 +1700,8 @@ LJFOLD(ABC any any)
1700LJFOLDF(abc_invar) 1700LJFOLDF(abc_invar)
1701{ 1701{
1702 /* Invariant ABC marked as PTR. Drop if op1 is invariant, too. */ 1702 /* Invariant ABC marked as PTR. Drop if op1 is invariant, too. */
1703 if (!irt_isint(fins->t) && fins->op1 < J->chain[IR_LOOP]) 1703 if (!irt_isint(fins->t) && fins->op1 < J->chain[IR_LOOP] &&
1704 !irt_isphi(IR(fins->op1)->t))
1704 return DROPFOLD; 1705 return DROPFOLD;
1705 return NEXTFOLD; 1706 return NEXTFOLD;
1706} 1707}