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 a3c8723b..3dd041d4 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -1859,7 +1859,8 @@ LJFOLD(ABC any any)
1859LJFOLDF(abc_invar) 1859LJFOLDF(abc_invar)
1860{ 1860{
1861 /* Invariant ABC marked as PTR. Drop if op1 is invariant, too. */ 1861 /* Invariant ABC marked as PTR. Drop if op1 is invariant, too. */
1862 if (!irt_isint(fins->t) && fins->op1 < J->chain[IR_LOOP]) 1862 if (!irt_isint(fins->t) && fins->op1 < J->chain[IR_LOOP] &&
1863 !irt_isphi(IR(fins->op1)->t))
1863 return DROPFOLD; 1864 return DROPFOLD;
1864 return NEXTFOLD; 1865 return NEXTFOLD;
1865} 1866}