Index: src/ia32/lithium-ia32.h |
diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h |
index 490b7805744229e6e02323cf907f9dc947154a26..d7e865d18d99e59fd9fc2695a0d484fc61d0861c 100644 |
--- a/src/ia32/lithium-ia32.h |
+++ b/src/ia32/lithium-ia32.h |
@@ -1370,6 +1370,11 @@ class LAddI: public LTemplateInstruction<1, 2, 0> { |
LOperand* left() { return inputs_[0]; } |
LOperand* right() { return inputs_[1]; } |
+ static bool UseLea(HAdd* add) { |
+ return !add->CheckFlag(HValue::kCanOverflow) && |
+ add->BetterCandidateForRegisterOperand()->UseCount() > 1; |
+ } |
+ |
DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") |
DECLARE_HYDROGEN_ACCESSOR(Add) |
}; |