Commit 6ddbb54f authored by Stephen Kyle's avatar Stephen Kyle Committed by Commit Bot

compiler/arm64: change nops to use EmitIdentity

This affects VisitChangeUint32ToUint64 and VisitTruncateInt64ToInt32.

The geometric mean of changes across octane, ares6-1.0.1, jetstream2,
and web-tooling-0.5.3, was an improvement of 1.2% when running on a
Cortex-A53.

Change-Id: Ib551641fb78ce4060100129e12f23cd02b0b3b27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1669690Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62327}
parent 7e5d6304
......@@ -1599,7 +1599,7 @@ void InstructionSelector::VisitChangeUint32ToUint64(Node* node) {
// 32-bit operations will write their result in a W register (implicitly
// clearing the top 32-bit of the corresponding X register) so the
// zero-extension is a no-op.
Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
EmitIdentity(node);
return;
}
case IrOpcode::kLoad: {
......@@ -1610,7 +1610,7 @@ void InstructionSelector::VisitChangeUint32ToUint64(Node* node) {
case MachineRepresentation::kWord8:
case MachineRepresentation::kWord16:
case MachineRepresentation::kWord32:
Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
EmitIdentity(node);
return;
default:
break;
......@@ -1665,10 +1665,9 @@ void InstructionSelector::VisitChangeCompressedSignedToTaggedSigned(
void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) {
Arm64OperandGenerator g(this);
Node* value = node->InputAt(0);
// The top 32 bits in the 64-bit register will be undefined, and
// must not be used by a dependent node.
Emit(kArchNop, g.DefineSameAsFirst(node), g.UseRegister(value));
EmitIdentity(node);
}
void InstructionSelector::VisitFloat64Mod(Node* 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