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 290117 86019126140cf059161155a1cc8ecc85f8885d29
parent 290116 6e0b1e57c8e8f20d85ecaca197addc218da63ea8
child 290118 189899f5bdf6f266e7376d087347b46ed3332fb3
push id30114
push usercbook@mozilla.com
push dateThu, 24 Mar 2016 15:15:54 +0000
treeherdermozilla-central@24c5fbde4488 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjolesen
bugs1258748
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;
 }