Bug 1258748 - adjustPhiInputs: Add MBox in the predecessor block instead of the definition block. r=jolesen
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Wed, 23 Mar 2016 19:03:40 +0000
changeset 290176 86019126140cf059161155a1cc8ecc85f8885d29
parent 290175 6e0b1e57c8e8f20d85ecaca197addc218da63ea8
child 290177 189899f5bdf6f266e7376d087347b46ed3332fb3
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjolesen
bugs1258748
milestone48.0a1
Bug 1258748 - adjustPhiInputs: Add MBox in the predecessor block instead of the definition block. r=jolesen
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -1473,17 +1473,18 @@ TypeAnalyzer::adjustPhiInputs(MPhi* phi)
         // the original box.
         if (in->isUnbox() && phi->typeIncludes(in->toUnbox()->input()))
             in = in->toUnbox()->input();
 
         if (in->type() != MIRType_Value) {
             if (!alloc().ensureBallast())
                 return false;
 
-            in = AlwaysBoxAt(alloc(), in->block()->lastIns(), in);
+            MBasicBlock* pred = phi->block()->getPredecessor(i);
+            in = AlwaysBoxAt(alloc(), pred->lastIns(), in);
         }
 
         phi->replaceOperand(i, in);
     }
 
     return true;
 }