Add missing PHI barrier to strength reduction of widening.

This commit is contained in:
Mike Pall 2010-12-12 21:03:20 +01:00
parent 42f9b38663
commit a403cb13e4

View File

@ -778,6 +778,7 @@ LJFOLDF(simplify_zext64)
{ {
#if LJ_TARGET_X64 #if LJ_TARGET_X64
/* Eliminate widening. All 32 bit ops implicitly zero-extend the result. */ /* Eliminate widening. All 32 bit ops implicitly zero-extend the result. */
PHIBARRIER(fleft);
return LEFTFOLD; return LEFTFOLD;
#else #else
UNUSED(J); UNUSED(J);
@ -790,6 +791,7 @@ LJFOLDF(simplify_sext64)
{ {
IRRef ref = fins->op1; IRRef ref = fins->op1;
int64_t ofs = 0; int64_t ofs = 0;
PHIBARRIER(fleft);
if (fleft->o == IR_ADD && irref_isk(fleft->op2)) { if (fleft->o == IR_ADD && irref_isk(fleft->op2)) {
ofs = (int64_t)IR(fleft->op2)->i; ofs = (int64_t)IR(fleft->op2)->i;
ref = fleft->op1; ref = fleft->op1;