Commit bd9bd17d authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[turbofan][x64] Make ChangeUint32ToUint64 a Nop after Load(kWord32)

A Load(kWord32) generates a movl instruction, which clears the high word
of a register already.

R=bmeurer@chromium.org

Change-Id: I835e5549483043a3faea08a1223070514f634c9e
Reviewed-on: https://chromium-review.googlesource.com/729863Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48777}
parent a00a9142
......@@ -1242,13 +1242,13 @@ bool ZeroExtendsWord32ToWord64(Node* node) {
}
}
case IrOpcode::kLoad: {
// The movzxbl/movsxbl/movzxwl/movsxwl operations implicitly zero-extend
// to 64-bit on x64,
// so the zero-extension is a no-op.
// The movzxbl/movsxbl/movzxwl/movsxwl/movl operations implicitly
// zero-extend to 64-bit on x64, so the zero-extension is a no-op.
LoadRepresentation load_rep = LoadRepresentationOf(node->op());
switch (load_rep.representation()) {
case MachineRepresentation::kWord8:
case MachineRepresentation::kWord16:
case MachineRepresentation::kWord32:
return true;
default:
return false;
......
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