Actually fixed ifeq/ifne fusion now.
authorDavid Anderson <danderson@mozilla.com>
Thu, 10 Jul 2008 17:54:19 -0700
changeset 17595 6d24485f818545901b0e0225a39bb2d9709c35d5
parent 17594 b9585554a05fd81e656fd6abaf704689bf2291bf
child 17596 bd78d1eedabe55ca8d7acc77af796ece9e0619d1
push id1452
push usershaver@mozilla.com
push dateFri, 22 Aug 2008 00:08:22 +0000
treeherdermozilla-central@d13bb0868596 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a1pre
Actually fixed ifeq/ifne fusion now.
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -1263,20 +1263,19 @@ TraceRecorder::cmp(LOpcode op, bool nega
             break;
           default:
             JS_ASSERT(op == LIR_feq);
             cond = asNumber(l) == asNumber(r);
             break;
         }
         /* The interpreter fuses comparisons and the following branch,
            so we have to do that here as well. */
-        if (cx->fp->regs->pc[1] == ::JSOP_IFEQ)
+        if (cx->fp->regs->pc[1] == ::JSOP_IFEQ
+            || cx->fp->regs->pc[1] == ::JSOP_IFNE)
             guard(cond, x);
-        else if (cx->fp->regs->pc[1] == ::JSOP_IFNE)
-            guard(!cond, x);
         /* We update the stack after the guard. This is safe since
            the guard bails out at the comparison and the interpreter
            will this re-execute the comparison. This way the
            value of the condition doesn't have to be calculated and
            saved on the stack in most cases. */
         set(&l, x);
         return true;
     }