Bug 552582 - TM: remove unused case from FuncFilter. r=gal.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 16 Mar 2010 14:58:52 +1100
changeset 40277 055d29aa484a71ef8df788fa776bd17371f986da
parent 40276 e7e05fc7d12036d250c546063b4e3e66e8a88243
child 40278 6db4daa3e64d0e2238fd1faf7eb5ac0004088cd5
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgal
bugs552582
milestone1.9.3a3pre
Bug 552582 - TM: remove unused case from FuncFilter. r=gal.
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -1657,22 +1657,16 @@ isPromoteUint(LIns* i)
 }
 
 static bool
 isPromote(LIns* i)
 {
     return isPromoteInt(i) || isPromoteUint(i);
 }
 
-static bool
-IsConst(LIns* i, int32_t c)
-{
-    return i->isconst() && i->imm32() == c;
-}
-
 /*
  * Determine whether this operand is guaranteed to not overflow the specified
  * integer operation.
  */
 static bool
 IsOverflowSafe(LOpcode op, LIns* i)
 {
     LIns* c;
@@ -1722,41 +1716,16 @@ public:
                 return out->ins2(v, demote(out, s0), demote(out, s1));
             } else if (isPromoteUint(s0) && isPromoteUint(s1)) {
                 // uint compare
                 v = LOpcode(v + (LIR_eq - LIR_feq));
                 if (v != LIR_eq)
                     v = LOpcode(v + (LIR_ult - LIR_lt)); // cmp -> ucmp
                 return out->ins2(v, demote(out, s0), demote(out, s1));
             }
-        } else if (v == LIR_or &&
-                   s0->isop(LIR_lsh) && IsConst(s0->oprnd2(), 16) &&
-                   s1->isop(LIR_and) && IsConst(s1->oprnd2(), 0xffff)) {
-            LIns* msw = s0->oprnd1();
-            LIns* lsw = s1->oprnd1();
-            LIns* x;
-            LIns* y;
-            if (lsw->isop(LIR_add) &&
-                lsw->oprnd1()->isop(LIR_and) &&
-                lsw->oprnd2()->isop(LIR_and) &&
-                IsConst(lsw->oprnd1()->oprnd2(), 0xffff) &&
-                IsConst(lsw->oprnd2()->oprnd2(), 0xffff) &&
-                msw->isop(LIR_add) &&
-                msw->oprnd1()->isop(LIR_add) &&
-                msw->oprnd2()->isop(LIR_rsh) &&
-                msw->oprnd1()->oprnd1()->isop(LIR_rsh) &&
-                msw->oprnd1()->oprnd2()->isop(LIR_rsh) &&
-                IsConst(msw->oprnd2()->oprnd2(), 16) &&
-                IsConst(msw->oprnd1()->oprnd1()->oprnd2(), 16) &&
-                IsConst(msw->oprnd1()->oprnd2()->oprnd2(), 16) &&
-                (x = lsw->oprnd1()->oprnd1()) == msw->oprnd1()->oprnd1()->oprnd1() &&
-                (y = lsw->oprnd2()->oprnd1()) == msw->oprnd1()->oprnd2()->oprnd1() &&
-                lsw == msw->oprnd2()->oprnd1()) {
-                return out->ins2(LIR_add, x, y);
-            }
         }
         return out->ins2(v, s0, s1);
     }
 };
 
 /*
  * Visit the values in the given JSStackFrame that the tracer cares about. This
  * visitor function is (implicitly) the primary definition of the native stack