Bug 875476 - Avoid passing operands of the wrong type to EvaluateConstantOperands, r=jandem.

This commit is contained in:
Brian Hackett 2013-05-29 08:57:02 -06:00
parent 9710cfcb3c
commit dd223e86ea

View File

@ -1283,7 +1283,7 @@ MBinaryArithInstruction::infer(BaselineInspector *inspector,
// If the operation will always overflow on its constant operands, use a
// double specialization so that it can be constant folded later.
if (isMul() || isDiv()) {
if ((isMul() || isDiv()) && lhs == MIRType_Int32 && rhs == MIRType_Int32) {
bool typeChange = false;
EvaluateConstantOperands(this, &typeChange);
if (typeChange)