Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 4cd9f76b2b4d87a8540a7ce18f29cc0c073a4801..6496fa8eeb9d96bd3e9e0e0a7827ce41619377fa 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1683,9 +1683,15 @@ void HInstanceOf::PrintDataTo(StringStream* stream) { |
Range* HValue::InferRange(Zone* zone) { |
- // Untagged integer32 cannot be -0, all other representations can. |
- Range* result = new(zone) Range(); |
- result->set_can_be_minus_zero(!representation().IsInteger32()); |
+ Range* result; |
+ if (type().IsSmi()) { |
+ result = new(zone) Range(Smi::kMinValue, Smi::kMaxValue); |
+ result->set_can_be_minus_zero(false); |
+ } else { |
+ // Untagged integer32 cannot be -0, all other representations can. |
+ result = new(zone) Range(); |
+ result->set_can_be_minus_zero(!representation().IsInteger32()); |
+ } |
return result; |
} |