Fix PHI barrier in BUFPUT FOLD rule.

This commit is contained in:
Mike Pall 2013-04-22 22:37:22 +02:00
parent a2c78810ca
commit 1ae3e5204b

View File

@ -547,8 +547,8 @@ LJFOLDF(bufput_kgc)
if (len2 == 0) { /* Empty string? */ if (len2 == 0) { /* Empty string? */
return LEFTFOLD; return LEFTFOLD;
} else { } 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. */ /* Join two constant string puts in a row. */
GCstr *s1 = ir_kstr(IR(fleft->op2)); GCstr *s1 = ir_kstr(IR(fleft->op2));
MSize len1 = s1->len; MSize len1 = s1->len;