Bug 875720 - Use baseline to identify arithmetic ops with double specialization instead of looking at TI overflow flag. r=jandem
authorKannan Vijayan <kvijayan@mozilla.com>
Wed, 12 Jun 2013 10:48:05 -0400
changeset 134774 6e11b247330e7728a422692413fc611a159e1121
parent 134773 a3d315019c47df5a0824f74a5eae5760202daa86
child 134775 ca367f2c1f8e572031235b3c27104c87e4008b6f
push id29372
push userkvijayan@mozilla.com
push dateWed, 12 Jun 2013 14:48:51 +0000
treeherdermozilla-inbound@6e11b247330e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs875720
milestone24.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 875720 - Use baseline to identify arithmetic ops with double specialization instead of looking at TI overflow flag. r=jandem
js/src/ion/BaselineInspector.h
js/src/ion/MIR.cpp
--- a/js/src/ion/BaselineInspector.h
+++ b/js/src/ion/BaselineInspector.h
@@ -28,17 +28,16 @@ class ICInspector
 
     ICInspector(BaselineInspector *inspector, jsbytecode *pc, ICEntry *icEntry)
       : inspector_(inspector), pc_(pc), icEntry_(icEntry)
     { }
 };
 
 class SetElemICInspector : public ICInspector
 {
-
   public:
     SetElemICInspector(BaselineInspector *inspector, jsbytecode *pc, ICEntry *icEntry)
       : ICInspector(inspector, pc, icEntry)
     { }
 
     bool sawOOBDenseWrite() const;
     bool sawOOBTypedArrayWrite() const;
     bool sawDenseWrite() const;
--- a/js/src/ion/MIR.cpp
+++ b/js/src/ion/MIR.cpp
@@ -1300,17 +1300,17 @@ MBinaryArithInstruction::infer(BaselineI
     if (lhs == MIRType_Int32 && rhs == MIRType_Int32)
         setResultType(MIRType_Int32);
     else if (lhs == MIRType_Double || rhs == MIRType_Double)
         setResultType(MIRType_Double);
     else
         return inferFallback(inspector, pc);
 
     // If the operation has ever overflowed, use a double specialization.
-    if (overflowed)
+    if (inspector->expectedResultType(pc) == MIRType_Double)
         setResultType(MIRType_Double);
 
     // If the operation will always overflow on its constant operands, use a
     // double specialization so that it can be constant folded later.
     if ((isMul() || isDiv()) && lhs == MIRType_Int32 && rhs == MIRType_Int32) {
         bool typeChange = false;
         EvaluateConstantOperands(this, &typeChange);
         if (typeChange)