Bug 930990 - Make MTest a consistent Float32 operation. r=sstangl
authorBenjamin Bouvier <benj@benj.me>
Fri, 25 Oct 2013 18:01:35 +0200
changeset 167147 9fbd0d6598a724b5f8f41586a596079def469f02
parent 167146 0c1d4dbe85c977095c718b4385b7d75db7e99c71
child 167148 c40e797b011f337a5e977a0eb867f8a7a2bc45e6
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs930990
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 930990 - Make MTest a consistent Float32 operation. r=sstangl
js/src/jit-test/tests/ion/bug930990.js
js/src/jit/MIR.h
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/ion/bug930990.js
@@ -0,0 +1,8 @@
+var f32 = new Float32Array(10);
+f32[0] = 5;
+var i = 0;
+do {
+    f32[i + 1] = f32[i] - 1;
+    i += 1;
+} while (f32[i]);
+
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -1298,16 +1298,21 @@ class MTest
     MDefinition *foldsTo(bool useValueNumbers);
 
     void markOperandCantEmulateUndefined() {
         operandMightEmulateUndefined_ = false;
     }
     bool operandMightEmulateUndefined() const {
         return operandMightEmulateUndefined_;
     }
+#ifdef DEBUG
+    bool isConsistentFloat32Use() const {
+        return true;
+    }
+#endif
 };
 
 // Returns from this function to the previous caller.
 class MReturn
   : public MAryControlInstruction<1, 0>,
     public BoxInputsPolicy
 {
     MReturn(MDefinition *ins) {