Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 76c5ca0a4df7835fcf4489500c7f5afd229ee54f..900e07ecdf9fa68a32540fc76be401d0b064a343 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -8858,8 +8858,10 @@ HValue* HGraphBuilder::BuildBinaryOperation( |
case Token::MOD: { |
if (fixed_right_arg.has_value) { |
if (right->IsConstant()) { |
- ASSERT_EQ(fixed_right_arg.value, |
- HConstant::cast(right)->Integer32Value()); |
+ HConstant* c_right = HConstant::cast(right); |
+ if (c_right->HasInteger32Value()) { |
+ ASSERT_EQ(fixed_right_arg.value, c_right->Integer32Value()); |
+ } |
} else { |
HConstant* fixed_right = Add<HConstant>( |
static_cast<int>(fixed_right_arg.value)); |