Commit 70dfb5a0 authored by georgia.kouveli's avatar georgia.kouveli Committed by Commit bot

[turbofan] Use an IntPtrConstant in WordEqual comparisons.

ZeroConstant is a NumberConstant, so does not get matched
in IntMatchers, which results in missing some opportunities
in instruction selection. Use IntPtrConstant instead, which
generates an Int32Constant or an Int64Constant depending on
the word size.

BUG=

Review-Url: https://codereview.chromium.org/2467473002
Cr-Commit-Position: refs/heads/master@{#40669}
parent 64421566
......@@ -925,7 +925,7 @@ EffectControlLinearizer::LowerTruncateTaggedToBit(Node* node, Node* effect,
values[count] =
graph()->NewNode(machine()->Word32Equal(),
graph()->NewNode(machine()->WordEqual(), value,
jsgraph()->ZeroConstant()),
jsgraph()->IntPtrConstant(0)),
zero);
count++;
}
......@@ -978,7 +978,7 @@ EffectControlLinearizer::LowerTruncateTaggedToBit(Node* node, Node* effect,
values[count] =
graph()->NewNode(machine()->Word32Equal(),
graph()->NewNode(machine()->WordEqual(), value_length,
jsgraph()->ZeroConstant()),
jsgraph()->IntPtrConstant(0)),
zero);
count++;
}
......
......@@ -676,7 +676,7 @@ Node* RepresentationChanger::GetBitRepresentationFor(
}
} else if (output_rep == MachineRepresentation::kTaggedSigned) {
node = jsgraph()->graph()->NewNode(machine()->WordEqual(), node,
jsgraph()->ZeroConstant());
jsgraph()->IntPtrConstant(0));
return jsgraph()->graph()->NewNode(machine()->Word32Equal(), node,
jsgraph()->Int32Constant(0));
} else if (IsWord(output_rep)) {
......
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