Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 522f99a6e6ed01d1b5c9db18b6860e7d0e256f8b..aef227f60d0b98a67c59c980fcbfc9947550a598 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1812,7 +1812,6 @@ HConstant::HConstant(Handle<Object> handle, Representation r) |
has_double_value_(false) { |
// Dereferencing here is safe: the value of a number object does not change. |
AllowHandleDereference allow_handle_deref(Isolate::Current()); |
- SetFlag(kUseGVN); |
if (handle_->IsNumber()) { |
double n = handle_->Number(); |
has_int32_value_ = IsInteger32(n); |
@@ -1829,7 +1828,7 @@ HConstant::HConstant(Handle<Object> handle, Representation r) |
r = Representation::Tagged(); |
} |
} |
- set_representation(r); |
+ Initialize(r); |
} |
@@ -1838,8 +1837,7 @@ HConstant::HConstant(int32_t integer_value, Representation r) |
has_double_value_(true), |
int32_value_(integer_value), |
double_value_(FastI2D(integer_value)) { |
- set_representation(r); |
- SetFlag(kUseGVN); |
+ Initialize(r); |
} |
@@ -1848,8 +1846,16 @@ HConstant::HConstant(double double_value, Representation r) |
has_double_value_(true), |
int32_value_(DoubleToInt32(double_value)), |
double_value_(double_value) { |
+ Initialize(r); |
+} |
+ |
+ |
+void HConstant::Initialize(Representation r) { |
set_representation(r); |
SetFlag(kUseGVN); |
+ if (representation().IsInteger32()) { |
+ ClearGVNFlag(kDependsOnOsrEntries); |
+ } |
} |