Index: src/compiler/representation-change.cc |
diff --git a/src/compiler/representation-change.cc b/src/compiler/representation-change.cc |
index 00b70ff4d1ed298ef2177afb39cf11d1db78f5b2..93566da6cab237a312b34e0b8235f029cf7135ad 100644 |
--- a/src/compiler/representation-change.cc |
+++ b/src/compiler/representation-change.cc |
@@ -634,10 +634,10 @@ Node* RepresentationChanger::GetWord32RepresentationFor( |
} else if (output_type->Is(Type::Unsigned32())) { |
op = simplified()->ChangeTaggedToUint32(); |
} else if (use_info.truncation().IsUsedAsWord32()) { |
- if (use_info.type_check() != TypeCheckKind::kNone) { |
- op = simplified()->CheckedTruncateTaggedToWord32(); |
- } else { |
+ if (output_type->Is(Type::NumberOrOddball())) { |
op = simplified()->TruncateTaggedToWord32(); |
+ } else if (use_info.type_check() != TypeCheckKind::kNone) { |
+ op = simplified()->CheckedTruncateTaggedToWord32(); |
} |
} |
} else if (output_rep == MachineRepresentation::kWord32) { |