Bug 930477: Inline MPow with Float32 inputs even if it's not specialized; r=jandem
authorBenjamin Bouvier <benj@benj.me>
Thu, 20 Feb 2014 19:20:08 +0100
changeset 170068 7a5cbe4dadf88785c687b75af0f48b26ba3494bc
parent 170067 25168278f39a33195212bce25cb1b1f93ec7cb82
child 170069 94fda27a798e27bbbc6038bcebd2f9fee6942515
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersjandem
bugs930477
milestone30.0a1
Bug 930477: Inline MPow with Float32 inputs even if it's not specialized; r=jandem
js/src/jit/MCallOptimize.cpp
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -770,19 +770,19 @@ IonBuilder::inlineMathPow(CallInfo &call
 
     // Typechecking.
     MIRType baseType = callInfo.getArg(0)->type();
     MIRType powerType = callInfo.getArg(1)->type();
     MIRType outputType = getInlineReturnType();
 
     if (outputType != MIRType_Int32 && outputType != MIRType_Double)
         return InliningStatus_NotInlined;
-    if (baseType != MIRType_Int32 && baseType != MIRType_Double)
+    if (!IsNumberType(baseType))
         return InliningStatus_NotInlined;
-    if (powerType != MIRType_Int32 && powerType != MIRType_Double)
+    if (!IsNumberType(powerType))
         return InliningStatus_NotInlined;
 
     callInfo.setImplicitlyUsedUnchecked();
 
     MDefinition *base = callInfo.getArg(0);
     MDefinition *power = callInfo.getArg(1);
     MDefinition *output = nullptr;