Commit 6ade0ee3 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Improve NumberAbs lowering for Signed32 input.

We can just do the Int32Abs lowering always for Signed32 inputs.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2134143002
Cr-Commit-Position: refs/heads/master@{#37638}
parent 4f2d37da
......@@ -1601,7 +1601,7 @@ class RepresentationSelector {
VisitUnop(node, UseInfo::TruncatingWord32(),
MachineRepresentation::kWord32);
if (lower()) DeferReplacement(node, node->InputAt(0));
} else if (InputIs(node, type_cache_.kSafeSigned32)) {
} else if (InputIs(node, Type::Signed32())) {
VisitUnop(node, UseInfo::TruncatingWord32(),
MachineRepresentation::kWord32);
if (lower()) DeferReplacement(node, lowering->Int32Abs(node));
......
......@@ -73,7 +73,6 @@ class TypeCache final {
Type* const kSafeIntegerOrMinusZero =
Type::Union(kSafeInteger, Type::MinusZero(), zone());
Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger);
Type* const kSafeSigned32 = CreateRange(-kMaxInt, kMaxInt);
Type* const kUntaggedUndefined =
Type::Intersect(Type::Undefined(), Type::Untagged(), zone());
......
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