Bug 1011745 - Correctly distinguish loop header phis. r=h4writer a=abillings

This commit is contained in:
Nicolas B. Pierron 2014-06-19 02:01:03 -07:00
parent d3ed70b23e
commit 76316ea76c

View File

@ -1141,7 +1141,7 @@ MBasicBlock::inheritPhis(MBasicBlock *header)
for (size_t slot = 0; slot < stackDepth; slot++) {
MDefinition *exitDef = getSlot(slot);
MDefinition *loopDef = headerRp->getOperand(slot);
if (!loopDef->isPhi()) {
if (loopDef->block() != header) {
MOZ_ASSERT(loopDef->block()->id() < header->id());
MOZ_ASSERT(loopDef == exitDef);
continue;
@ -1177,7 +1177,7 @@ MBasicBlock::inheritPhisFromBackedge(MBasicBlock *backedge, bool *hadTypeChange)
// Get the value of the loop header.
MDefinition *loopDef = entryResumePoint()->getOperand(slot);
if (!loopDef->isPhi()) {
if (loopDef->block() != this) {
// If we are finishing a pending loop header, then we need to ensure
// that all operands are phis. This is usualy the case, except for
// object/arrays build with generators, in which case we share the