Bug 924660 - IonMonkey: Revert unintended changes to MDiv::truncate introduced in 6afebbb8e595. r=nbp
authorDan Gohman <sunfish@google.com>
Tue, 15 Oct 2013 20:49:44 -0700
changeset 164688 eba7271a9bee4b06a0c894b10c8ab48764cf68cd
parent 164687 8f0ebd310f1d0ef9d2d25b2a56b520b264ea13c3
child 164689 42a20a0d42695e2787a6052ed62a66b371cd8a65
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs924660
milestone27.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 924660 - IonMonkey: Revert unintended changes to MDiv::truncate introduced in 6afebbb8e595. r=nbp
js/src/jit/RangeAnalysis.cpp
--- a/js/src/jit/RangeAnalysis.cpp
+++ b/js/src/jit/RangeAnalysis.cpp
@@ -2023,32 +2023,23 @@ MMul::truncate()
 }
 
 bool
 MDiv::truncate()
 {
     // Remember analysis, needed to remove negative zero checks.
     setTruncated(true);
 
-    if (type() == MIRType_Double || type() == MIRType_Int32) {
-        specialization_ = MIRType_Int32;
-        setResultType(MIRType_Int32);
-        if (range())
-            range()->wrapAroundToInt32();
-
-        // Divisions where the lhs and rhs are unsigned and the result is
-        // truncated can be lowered more efficiently.
-        if (tryUseUnsignedOperands())
-            unsigned_ = true;
-
+    // Divisions where the lhs and rhs are unsigned and the result is
+    // truncated can be lowered more efficiently.
+    if (specialization() == MIRType_Int32 && tryUseUnsignedOperands()) {
+        unsigned_ = true;
         return true;
     }
 
-    JS_ASSERT(specialization() != MIRType_Int32); // fixme
-
     // No modifications.
     return false;
 }
 
 bool
 MMod::truncate()
 {
     // Remember analysis, needed to remove negative zero checks.