Bug 1011283 - IonMonkey: Disable the DivOrModConstantI optimization. r=nbp
authorDan Gohman <sunfish@mozilla.com>
Fri, 20 Jun 2014 17:51:40 -0700
changeset 189911 bf47f42c33c8bbe275903f9ace0effee6df02439
parent 189910 3d54fd14fb9c6fce3336ea14831ff51b6bbc6b5d
child 189912 83977d2750a225aa095b018c841d4c2169118209
push id26999
push userryanvm@gmail.com
push dateMon, 23 Jun 2014 14:42:40 +0000
treeherdermozilla-central@4a7f4ed3f08b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1011283
milestone33.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 1011283 - IonMonkey: Disable the DivOrModConstantI optimization. r=nbp
js/src/jit/shared/Lowering-x86-shared.cpp
--- a/js/src/jit/shared/Lowering-x86-shared.cpp
+++ b/js/src/jit/shared/Lowering-x86-shared.cpp
@@ -150,22 +150,16 @@ LIRGeneratorX86Shared::lowerDivI(MDiv *d
             } else {
                 // Numerator is signed, and needs adjusting, and an extra
                 // lhs copy register is needed.
                 lir = new(alloc()) LDivPowTwoI(lhs, useRegister(div->lhs()), shift, rhs < 0);
             }
             if (div->fallible() && !assignSnapshot(lir, Bailout_DoubleOutput))
                 return false;
             return defineReuseInput(lir, div, 0);
-        } else if (rhs != 0) {
-            LDivOrModConstantI *lir;
-            lir = new(alloc()) LDivOrModConstantI(useRegister(div->lhs()), rhs, tempFixed(eax));
-            if (div->fallible() && !assignSnapshot(lir, Bailout_DoubleOutput))
-                return false;
-            return defineFixed(lir, div, LAllocation(AnyRegister(edx)));
         }
     }
 
     LDivI *lir = new(alloc()) LDivI(useRegister(div->lhs()), useRegister(div->rhs()),
                                     tempFixed(edx));
     if (div->fallible() && !assignSnapshot(lir, Bailout_DoubleOutput))
         return false;
     return defineFixed(lir, div, LAllocation(AnyRegister(eax)));
@@ -180,22 +174,16 @@ LIRGeneratorX86Shared::lowerModI(MMod *m
     if (mod->rhs()->isConstant()) {
         int32_t rhs = mod->rhs()->toConstant()->value().toInt32();
         int32_t shift = FloorLog2(Abs(rhs));
         if (rhs != 0 && uint32_t(1) << shift == Abs(rhs)) {
             LModPowTwoI *lir = new(alloc()) LModPowTwoI(useRegisterAtStart(mod->lhs()), shift);
             if (mod->fallible() && !assignSnapshot(lir, Bailout_DoubleOutput))
                 return false;
             return defineReuseInput(lir, mod, 0);
-        } else if (rhs != 0) {
-            LDivOrModConstantI *lir;
-            lir = new(alloc()) LDivOrModConstantI(useRegister(mod->lhs()), rhs, tempFixed(edx));
-            if (mod->fallible() && !assignSnapshot(lir, Bailout_DoubleOutput))
-                return false;
-            return defineFixed(lir, mod, LAllocation(AnyRegister(eax)));
         }
     }
 
     LModI *lir = new(alloc()) LModI(useRegister(mod->lhs()),
                                     useRegister(mod->rhs()),
                                     tempFixed(eax));
     if (mod->fallible() && !assignSnapshot(lir, Bailout_DoubleOutput))
         return false;