| Index: src/hydrogen-canonicalize.cc
|
| diff --git a/src/hydrogen-canonicalize.cc b/src/hydrogen-canonicalize.cc
|
| index 40cbe4c0655d4cd315d761fbf0d63b3aa0530a95..643234392d0ac942d719dc3cb71a87b29ab5cf7e 100644
|
| --- a/src/hydrogen-canonicalize.cc
|
| +++ b/src/hydrogen-canonicalize.cc
|
| @@ -38,11 +38,18 @@ void HCanonicalizePhase::Run() {
|
| for (int i = 0; i < blocks->length(); ++i) {
|
| for (HInstructionIterator it(blocks->at(i)); !it.Done(); it.Advance()) {
|
| HInstruction* instr = it.Current();
|
| - if (instr->IsArithmeticBinaryOperation() &&
|
| - instr->representation().IsInteger32() &&
|
| - instr->HasAtLeastOneUseWithFlagAndNoneWithout(
|
| - HInstruction::kTruncatingToInt32)) {
|
| - instr->SetFlag(HInstruction::kAllUsesTruncatingToInt32);
|
| + if (instr->IsArithmeticBinaryOperation()) {
|
| + if (instr->representation().IsInteger32()) {
|
| + if (instr->HasAtLeastOneUseWithFlagAndNoneWithout(
|
| + HInstruction::kTruncatingToInt32)) {
|
| + instr->SetFlag(HInstruction::kAllUsesTruncatingToInt32);
|
| + }
|
| + } else if (instr->representation().IsSmi()) {
|
| + if (instr->HasAtLeastOneUseWithFlagAndNoneWithout(
|
| + HInstruction::kTruncatingToSmi)) {
|
| + instr->SetFlag(HInstruction::kAllUsesTruncatingToSmi);
|
| + }
|
| + }
|
| }
|
| }
|
| }
|
|
|