diff options
| author | Mike Pall <mike> | 2010-04-28 22:00:40 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2010-04-28 22:00:40 +0200 |
| commit | f28a42c9239142441bf3e3149f5d76efab71aac2 (patch) | |
| tree | 979d0afb07cfdf3f078cb73b6073011eda43dc92 | |
| parent | 28cfccf748adbadf959e7d654bd1c7a58bf9d150 (diff) | |
| download | luajit-f28a42c9239142441bf3e3149f5d76efab71aac2.tar.gz luajit-f28a42c9239142441bf3e3149f5d76efab71aac2.tar.bz2 luajit-f28a42c9239142441bf3e3149f5d76efab71aac2.zip | |
Fix PHI elimination: mark right PHI as used, too.
| -rw-r--r-- | src/lj_opt_loop.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lj_opt_loop.c b/src/lj_opt_loop.c index e0e6990e..48207dd5 100644 --- a/src/lj_opt_loop.c +++ b/src/lj_opt_loop.c | |||
| @@ -133,7 +133,11 @@ static void loop_emit_phi(jit_State *J, IRRef1 *subst, IRRef1 *phi, IRRef nphi) | |||
| 133 | while (!irref_isk(ref) && ref != subst[ref]) { | 133 | while (!irref_isk(ref) && ref != subst[ref]) { |
| 134 | IRIns *ir = IR(ref); | 134 | IRIns *ir = IR(ref); |
| 135 | irt_clearmark(ir->t); /* Unmark potential uses, too. */ | 135 | irt_clearmark(ir->t); /* Unmark potential uses, too. */ |
| 136 | if (irt_isphi(ir->t) || irt_ispri(ir->t)) | 136 | if (irt_isphi(ir->t)) { |
| 137 | irt_clearmark(IR(subst[ref])->t); | ||
| 138 | break; | ||
| 139 | } | ||
| 140 | if (irt_ispri(ir->t)) | ||
| 137 | break; | 141 | break; |
| 138 | irt_setphi(ir->t); | 142 | irt_setphi(ir->t); |
| 139 | if (nphi >= LJ_MAX_PHI) | 143 | if (nphi >= LJ_MAX_PHI) |
