Browse Source

Merge branch 'master' into v2.1

Mike Pall 12 years ago
parent
commit
ba9dde2ce6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lj_opt_fold.c

+ 2 - 1
src/lj_opt_fold.c

@@ -1859,7 +1859,8 @@ LJFOLD(ABC any any)
 LJFOLDF(abc_invar)
 LJFOLDF(abc_invar)
 {
 {
   /* Invariant ABC marked as PTR. Drop if op1 is invariant, too. */
   /* Invariant ABC marked as PTR. Drop if op1 is invariant, too. */
-  if (!irt_isint(fins->t) && fins->op1 < J->chain[IR_LOOP])
+  if (!irt_isint(fins->t) && fins->op1 < J->chain[IR_LOOP] &&
+      !irt_isphi(IR(fins->op1)->t))
     return DROPFOLD;
     return DROPFOLD;
   return NEXTFOLD;
   return NEXTFOLD;
 }
 }