Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 1b39f6fd60a9991934972982ad946d24635f99f8..cf77f24aa65e60125f0c4c16ef0bd2a78087cbd5 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -1531,7 +1531,11 @@ class HChange: public HUnaryOperation { |
set_representation(to); |
SetFlag(kUseGVN); |
if (allow_undefined_as_nan) SetFlag(kAllowUndefinedAsNaN); |
- if (is_truncating_to_smi) SetFlag(kTruncatingToSmi); |
+ if (is_truncating_to_smi) { |
+ SetFlag(kTruncatingToSmi); |
+ SetFlag(kTruncatingToInt32); |
+ } |
+ |
if (is_truncating_to_int32) SetFlag(kTruncatingToInt32); |
if (value->representation().IsSmi() || value->type().IsSmi()) { |
set_type(HType::Smi()); |
@@ -4431,7 +4435,6 @@ class HMul: public HArithmeticBinaryOperation { |
virtual void UpdateRepresentation(Representation new_rep, |
HInferRepresentationPhase* h_infer, |
const char* reason) { |
- if (new_rep.IsSmi()) new_rep = Representation::Integer32(); |
HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); |
} |
@@ -4643,6 +4646,7 @@ class HBitwise: public HBitwiseBinaryOperation { |
right->representation().IsSmi() && |
HConstant::cast(right)->Integer32Value() >= 0))) { |
SetFlag(kTruncatingToSmi); |
+ SetFlag(kTruncatingToInt32); |
// BIT_OR with a smi-range negative value will always set the entire |
// sign-extension of the smi-sign. |
} else if (op == Token::BIT_OR && |
@@ -4653,6 +4657,7 @@ class HBitwise: public HBitwiseBinaryOperation { |
right->representation().IsSmi() && |
HConstant::cast(right)->Integer32Value() < 0))) { |
SetFlag(kTruncatingToSmi); |
+ SetFlag(kTruncatingToInt32); |
} |
} |