Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index cab8d377b0a1291076ffafa12aa49d38aa7e227c..8547b09be29686c301e6ad10f4d38b6c75175de8 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -1125,8 +1125,11 @@ void LCodeGen::DoMulI(LMulI* instr) { |
__ testl(left, left); |
__ j(not_zero, &done, Label::kNear); |
Vyacheslav Egorov (Google)
2012/09/26 10:07:36
This code is redundant if right is 0. (left is alw
|
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) { |
+ __ cmpl(kScratchRegister, Immediate(0)); |
+ DeoptimizeIf(less, instr->environment()); |
} |
} else if (right->IsStackSlot()) { |
__ orl(kScratchRegister, ToOperand(right)); |