Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 96cd016e08b917bd29c68e5f80117c43e3f2d06e..8b40a249d34372d793adad1c69c6496d82e5bd52 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1540,7 +1540,10 @@ HInstruction* HForceRepresentation::New(Zone* zone, HValue* context, |
HConstant* c = HConstant::cast(value); |
if (c->HasNumberValue()) { |
double double_res = c->DoubleValue(); |
- if (representation.CanContainDouble(double_res)) { |
+ if (representation.IsDouble()) { |
+ return HConstant::New(zone, context, double_res); |
+ |
+ } else if (representation.CanContainDouble(double_res)) { |
return HConstant::New(zone, context, |
static_cast<int32_t>(double_res), |
representation); |