Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 7d413b9f622ff4f66eb4b5e055ff2dfaeaff861d..da17e297637f01656e5f7708be1aebf376ff2bfb 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -1234,8 +1234,11 @@ void LCodeGen::DoMulI(LMulI* instr) { |
__ test(left, Operand(left)); |
__ j(not_zero, &done, Label::kNear); |
if (right->IsConstantOperand()) { |
- if (ToInteger32(LConstantOperand::cast(right)) <= 0) { |
+ if (ToInteger32(LConstantOperand::cast(right)) < 0) { |
DeoptimizeIf(no_condition, instr->environment()); |
+ } else if (ToInteger32(LConstantOperand::cast(right)) == 0) { |
+ __ cmp(ToRegister(instr->temp()), Immediate(0)); |
+ DeoptimizeIf(less, instr->environment()); |
} |
} else { |
// Test the non-zero operand for negative sign. |