Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index 19e83ef36ebf8b82e9a11fc2c21e39b3dce8e0d8..e7d91f786af2ddd532f3c3e6f3dbb14acbcba2f3 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -10229,9 +10229,9 @@ void HOptimizedGraphBuilder::GenerateTypedArrayInitialize( |
HValue* byte_offset; |
bool is_zero_byte_offset; |
- if (arguments->at(kByteOffsetArg)->IsLiteral() && |
- Smi::kZero == |
- *static_cast<Literal*>(arguments->at(kByteOffsetArg))->value()) { |
+ if (arguments->at(kByteOffsetArg)->IsLiteral() |
+ && Smi::FromInt(0) == |
+ *static_cast<Literal*>(arguments->at(kByteOffsetArg))->value()) { |
byte_offset = Add<HConstant>(static_cast<int32_t>(0)); |
is_zero_byte_offset = true; |
} else { |