Backed out changeset 969ad213c983 (bug 1314438) for bustage
authorIris Hsiao <ihsiao@mozilla.com>
Mon, 07 Nov 2016 17:46:56 +0800
changeset 351432 e5dfb4395051b749c86e11c83d7d2233693c2267
parent 351431 bd16c2fde4bfec3766027861d8149ed13e418def
child 351433 f9d553507a1657d78b51d6b9b2413d2392d827d0
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1314438
milestone52.0a1
backs out969ad213c9831dbcebd9023a6755a7c59114151d
Backed out changeset 969ad213c983 (bug 1314438) for bustage CLOSED TREE
js/src/jit/MIR.cpp
js/src/jit/ValueNumbering.cpp
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -2385,18 +2385,17 @@ MPhi::foldsTernary(TempAllocator& alloc)
     {
         return nullptr;
     }
 
     // If testArg is an int32 type we can:
     // - fold testArg ? testArg : 0 to testArg
     // - fold testArg ? 0 : testArg to 0
     if (testArg->type() == MIRType::Int32 && c->numberToDouble() == 0) {
-        if (DeadIfUnused(testArg))
-            testArg->setGuardRangeBailoutsUnchecked();
+        testArg->setGuardRangeBailoutsUnchecked();
 
         // When folding to the constant we need to hoist it.
         if (trueDef == c && !c->block()->dominates(block()))
             c->block()->moveBefore(pred->lastIns(), c);
         return trueDef;
     }
 
     // If testArg is an double type we can:
@@ -4389,18 +4388,17 @@ MCompare::tryFoldEqualOperands(bool* res
                compareType_ == Compare_String || compareType_ == Compare_StrictString ||
                compareType_ == Compare_Object || compareType_ == Compare_Bitwise);
 
     if (isDoubleComparison() || isFloat32Comparison()) {
         if (!operandsAreNeverNaN())
             return false;
     }
 
-    if (DeadIfUnused(lhs()))
-        lhs()->setGuardRangeBailoutsUnchecked();
+    lhs()->setGuardRangeBailoutsUnchecked();
 
     *result = (jsop() == JSOP_STRICTEQ);
     return true;
 }
 
 bool
 MCompare::tryFoldTypeOf(bool* result)
 {
--- a/js/src/jit/ValueNumbering.cpp
+++ b/js/src/jit/ValueNumbering.cpp
@@ -791,20 +791,18 @@ ValueNumberer::visitDefinition(MDefiniti
         MOZ_ASSERT(!sim->isDiscarded());
         ReplaceAllUsesWith(def, sim);
 
         // The node's foldsTo said |def| can be replaced by |rep|. If |def| is a
         // guard, then either |rep| is also a guard, or a guard isn't actually
         // needed, so we can clear |def|'s guard flag and let it be discarded.
         def->setNotGuardUnchecked();
 
-        if (def->isGuardRangeBailouts()) {
-            if (DeadIfUnused(sim))
-                sim->setGuardRangeBailoutsUnchecked();
-        }
+        if (def->isGuardRangeBailouts())
+            sim->setGuardRangeBailoutsUnchecked();
 
         if (DeadIfUnused(def)) {
             if (!discardDefsRecursively(def))
                 return false;
 
             // If that ended up discarding |sim|, then we're done here.
             if (sim->isDiscarded())
                 return true;