Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: src/compiler/simplified-lowering.cc

Issue 994283005: [turbofan] Fix obsolete workaround for type system in simplified lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 1d6320ee3541a88aac7a7e90e024ddd2b835cf58..9a880dbb2e181c6cab8bcdf560750364b4929eb4 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -438,18 +438,8 @@ class RepresentationSelector {
return BothInputsAre(node, Type::Signed32()) && !CanObserveNonInt32(use);
}
- bool IsSafeIntAdditiveOperand(Node* node) {
- Type* type = NodeProperties::GetBounds(node).upper;
- // TODO(jarin): Unfortunately, bitset types are not subtypes of larger
- // range types, so we have to explicitly check for Integral32 here
- // (in addition to the safe integer range). Once we fix subtyping for
- // ranges, we should simplify this.
- return type->Is(safe_int_additive_range_) || type->Is(Type::Integral32());
- }
-
bool CanLowerToInt32AdditiveBinop(Node* node, MachineTypeUnion use) {
- return IsSafeIntAdditiveOperand(node->InputAt(0)) &&
- IsSafeIntAdditiveOperand(node->InputAt(1)) &&
+ return BothInputsAre(node, safe_int_additive_range_) &&
!CanObserveNonInt32(use);
}
@@ -458,8 +448,7 @@ class RepresentationSelector {
}
bool CanLowerToUint32AdditiveBinop(Node* node, MachineTypeUnion use) {
- return IsSafeIntAdditiveOperand(node->InputAt(0)) &&
- IsSafeIntAdditiveOperand(node->InputAt(1)) &&
+ return BothInputsAre(node, safe_int_additive_range_) &&
!CanObserveNonUint32(use);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698