Commit 796292a9 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[turbofan] Change FindOrderedHashEntryForInt32Key to return Word64 (on 64-bit).

The computation to find the hash entry is already performed on Word64,
and the actual value access later is also performed on Word64 indices,
so there's no point to go to Word32 in between.

Bug: v8:8015, v8:8178
Change-Id: I160e02166beceb79dcc8e69f9c365871a4c42606
Reviewed-on: https://chromium-review.googlesource.com/1226648Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55950}
parent 34c8119d
......@@ -4994,14 +4994,14 @@ Node* EffectControlLinearizer::LowerFindOrderedHashMapEntryForInt32Key(
kHeapObjectTag))));
auto loop = __ MakeLoopLabel(MachineType::PointerRepresentation());
auto done = __ MakeLabel(MachineRepresentation::kWord32);
auto done = __ MakeLabel(MachineType::PointerRepresentation());
__ Goto(&loop, first_entry);
__ Bind(&loop);
{
Node* entry = loop.PhiAt(0);
Node* check =
__ WordEqual(entry, __ IntPtrConstant(OrderedHashMap::kNotFound));
__ GotoIf(check, &done, __ Int32Constant(-1));
__ GotoIf(check, &done, entry);
entry = __ IntAdd(
__ IntMul(entry, __ IntPtrConstant(OrderedHashMap::kEntrySize)),
number_of_buckets);
......@@ -5030,10 +5030,7 @@ Node* EffectControlLinearizer::LowerFindOrderedHashMapEntryForInt32Key(
&if_match, &if_notmatch);
__ Bind(&if_match);
{
Node* index = ChangeIntPtrToInt32(entry);
__ Goto(&done, index);
}
__ Goto(&done, entry);
__ Bind(&if_notmatch);
{
......
......@@ -3146,7 +3146,7 @@ class RepresentationSelector {
Type const key_type = TypeOf(node->InputAt(1));
if (key_type.Is(Type::Signed32OrMinusZero())) {
VisitBinop(node, UseInfo::AnyTagged(), UseInfo::TruncatingWord32(),
MachineRepresentation::kWord32);
MachineType::PointerRepresentation());
if (lower()) {
NodeProperties::ChangeOp(
node,
......
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