From 6964a7752ae314dcae693abcb0c1175c95ad22e0 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 5 Jan 2014 16:57:51 +0100 Subject: [PATCH] Fix ABC elimination. --- src/lj_opt_fold.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) LJFOLDF(abc_invar) { /* 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 NEXTFOLD; }