]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix PHI elimination: mark right PHI as used, too.
authorMike Pall <mike>
Wed, 28 Apr 2010 20:00:40 +0000 (22:00 +0200)
committerMike Pall <mike>
Wed, 28 Apr 2010 20:00:40 +0000 (22:00 +0200)
src/lj_opt_loop.c

index e0e6990e46f7e15f042f66fcfbc3d112014ec170..48207dd58873233ef4a96500bfbfd6baeaaeff1d 100644 (file)
@@ -133,7 +133,11 @@ static void loop_emit_phi(jit_State *J, IRRef1 *subst, IRRef1 *phi, IRRef nphi)
     while (!irref_isk(ref) && ref != subst[ref]) {
       IRIns *ir = IR(ref);
       irt_clearmark(ir->t);  /* Unmark potential uses, too. */
-      if (irt_isphi(ir->t) || irt_ispri(ir->t))
+      if (irt_isphi(ir->t)) {
+       irt_clearmark(IR(subst[ref])->t);
+       break;
+      }
+      if (irt_ispri(ir->t))
        break;
       irt_setphi(ir->t);
       if (nphi >= LJ_MAX_PHI)