diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c index f35593f3..fc91a75e 100644 --- a/src/lj_opt_fold.c +++ b/src/lj_opt_fold.c @@ -547,8 +547,8 @@ LJFOLDF(bufput_kgc) if (len2 == 0) { /* Empty string? */ return LEFTFOLD; } else { - PHIBARRIER(fleft); - if (fleft->o == IR_BUFPUT && IR(fleft->op2)->o == IR_KGC) { + if (fleft->o == IR_BUFPUT && IR(fleft->op2)->o == IR_KGC && + !irt_isphi(fleft->t)) { /* Join two constant string puts in a row. */ GCstr *s1 = ir_kstr(IR(fleft->op2)); MSize len1 = s1->len;