Commit 77b6a076 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Fix obsolete workaround for type system in simplified lowering.

Ranges and bitset types now work together, so we don't need these weird
hacks anymore.

R=jarin@chromium.org

Review URL: https://codereview.chromium.org/994283005

Cr-Commit-Position: refs/heads/master@{#27237}
parent 85a0e807
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment