Bug 1201469: IonMonkey: Don't specialize to float32 when binary arith instruction is a vm call, r=bbouvier
authorHannes Verschore <hv1989@gmail.com>
Thu, 10 Sep 2015 14:02:23 +0200
changeset 294377 6305e8ca4f6b9303e7beb3dc06d5e8e03309e71f
parent 294376 0e15a964f1f967fff3a225f782d6e2585b0af272
child 294378 20914863e9b5253941275c3120960d6620c4fa88
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1201469
milestone43.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 1201469: IonMonkey: Don't specialize to float32 when binary arith instruction is a vm call, r=bbouvier
js/src/jit-test/tests/ion/bug1201469.js
js/src/jit/MIR.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/ion/bug1201469.js
@@ -0,0 +1,16 @@
+f = (function() {
+    "use asm";
+    var a;
+    function f() {
+        var b = -1;
+    }
+    return f;
+})();
+for (var j = 0; j < 1; ++j)
+    f();
+setJitCompilerOption('ion.forceinlineCaches', 1);
+Math.fround(
+    Math.fround()
+);
+for (var j = 0; j < 1; ++j)
+    (function() {})();
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -2332,16 +2332,18 @@ MFilterTypeSet::canConsumeFloat32(MUse* 
 }
 
 void
 MBinaryArithInstruction::trySpecializeFloat32(TempAllocator& alloc)
 {
     // Do not use Float32 if we can use int32.
     if (specialization_ == MIRType_Int32)
         return;
+    if (specialization_ == MIRType_None)
+        return;
 
     MDefinition* left = lhs();
     MDefinition* right = rhs();
 
     if (!left->canProduceFloat32() || !right->canProduceFloat32() ||
         !CheckUsesAreFloat32Consumers(this))
     {
         if (left->type() == MIRType_Float32)