Index: src/hydrogen-dehoist.cc |
diff --git a/src/hydrogen-dehoist.cc b/src/hydrogen-dehoist.cc |
index 696d22c608e5b707635b13229cf0046dda4c3e03..67e6718998319d24158e901c2683f145282eb927 100644 |
--- a/src/hydrogen-dehoist.cc |
+++ b/src/hydrogen-dehoist.cc |
@@ -38,7 +38,7 @@ static void DehoistArrayIndex(ArrayInstructionInterface* array_operation) { |
HConstant* constant; |
HValue* subexpression; |
HBinaryOperation* binary_operation = HBinaryOperation::cast(index); |
- if (binary_operation->left()->IsConstant()) { |
+ if (binary_operation->left()->IsConstant() && index->IsAdd()) { |
subexpression = binary_operation->right(); |
constant = HConstant::cast(binary_operation->left()); |
} else if (binary_operation->right()->IsConstant()) { |