From 10c14a4b14b80501350904fda2217766590fcb8b Mon Sep 17 00:00:00 2001 From: Iris Hsiao Date: Mon, 7 Nov 2016 17:46:56 +0800 Subject: [PATCH] Backed out changeset 969ad213c983 (bug 1314438) for bustage CLOSED TREE --- js/src/jit/MIR.cpp | 6 ++---- js/src/jit/ValueNumbering.cpp | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/js/src/jit/MIR.cpp b/js/src/jit/MIR.cpp index f1a8970ce361..9421e7a28986 100644 --- a/js/src/jit/MIR.cpp +++ b/js/src/jit/MIR.cpp @@ -2390,8 +2390,7 @@ MPhi::foldsTernary(TempAllocator& alloc) // - 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())) @@ -4394,8 +4393,7 @@ MCompare::tryFoldEqualOperands(bool* result) return false; } - if (DeadIfUnused(lhs())) - lhs()->setGuardRangeBailoutsUnchecked(); + lhs()->setGuardRangeBailoutsUnchecked(); *result = (jsop() == JSOP_STRICTEQ); return true; diff --git a/js/src/jit/ValueNumbering.cpp b/js/src/jit/ValueNumbering.cpp index 470ddf9aa007..a62be6eb9911 100644 --- a/js/src/jit/ValueNumbering.cpp +++ b/js/src/jit/ValueNumbering.cpp @@ -796,10 +796,8 @@ ValueNumberer::visitDefinition(MDefinition* def) // 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))