[compiler][arm64] Remove OneLaneSwizzle [v8/v8 : main]

0 views
Skip to first unread message

Sam Parker-Haynes (Gerrit)

unread,
Jan 7, 2026, 6:57:13 AM (2 days ago) Jan 7
to Nico Hartmann, V8 LUCI CQ, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Nico Hartmann

Sam Parker-Haynes voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Nico Hartmann
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
Gerrit-Change-Number: 7364005
Gerrit-PatchSet: 1
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 11:57:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Darius Mercadier (Gerrit)

unread,
Jan 8, 2026, 3:35:39 AM (yesterday) Jan 8
to Sam Parker-Haynes, Nico Hartmann, V8 LUCI CQ, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Nico Hartmann and Sam Parker-Haynes

Darius Mercadier voted and added 3 comments

Votes added by Darius Mercadier

Code-Review+1

3 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Darius Mercadier . resolved

LGTM % comments

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 6244, Patchset 1 (Latest): InstructionOperand temp = g.TempSimd128Register();
Emit(kArm64S128MoveReg, temp, g.UseRegister(input0));
Darius Mercadier . unresolved

So I could be wrong because I get confused by UseRegister vs UseUniqueRegister every few months, but I don't think that you are guaranteed that `temp` and `g.UseRegister(input0)` don't alias. And if that happens, the `DCHECK_NE(dst, src);` you added in the code generator will trigger. I think that you need `UseUniqueRegister(input0)` instead of `UseRegister(input0)` (also in the next Emit maybe).

Line 6246, Patchset 1 (Latest): Emit(kArm64S128MoveLane | LaneSizeField::encode(32),
g.DefineSameAsFirst(node), temp, g.UseRegister(input0),
g.UseImmediate(from), g.UseImmediate(to));
Darius Mercadier . unresolved

Is this covered by some tests? There is a `DCHECK_EQ(dst, i.InputSimd128Register(0).Format(f));` in the codegen when processing kArm64S128MoveLane and I think that this would require `temp` and `g.DefineSameAsFirst(node)` to alias, and I don't see how you're guaranteeing this. Please add a test.

Open in Gerrit

Related details

Attention is currently required from:
  • Nico Hartmann
  • Sam Parker-Haynes
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
Gerrit-Change-Number: 7364005
Gerrit-PatchSet: 1
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Thu, 08 Jan 2026 08:35:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jan 8, 2026, 6:29:33 AM (24 hours ago) Jan 8
to AyeAye, Darius Mercadier, Nico Hartmann, V8 LUCI CQ, was...@google.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Nico Hartmann

Sam Parker-Haynes added 2 comments

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 6244, Patchset 1: InstructionOperand temp = g.TempSimd128Register();
Emit(kArm64S128MoveReg, temp, g.UseRegister(input0));
Darius Mercadier . resolved

So I could be wrong because I get confused by UseRegister vs UseUniqueRegister every few months, but I don't think that you are guaranteed that `temp` and `g.UseRegister(input0)` don't alias. And if that happens, the `DCHECK_NE(dst, src);` you added in the code generator will trigger. I think that you need `UseUniqueRegister(input0)` instead of `UseRegister(input0)` (also in the next Emit maybe).

Sam Parker-Haynes

Ah, interesting. I do feel like the instruction selector is much harder to work with than it should be! I will try to remember this in the future, thanks.

Line 6246, Patchset 1: Emit(kArm64S128MoveLane | LaneSizeField::encode(32),

g.DefineSameAsFirst(node), temp, g.UseRegister(input0),
g.UseImmediate(from), g.UseImmediate(to));
Darius Mercadier . unresolved

Is this covered by some tests? There is a `DCHECK_EQ(dst, i.InputSimd128Register(0).Format(f));` in the codegen when processing kArm64S128MoveLane and I think that this would require `temp` and `g.DefineSameAsFirst(node)` to alias, and I don't see how you're guaranteeing this. Please add a test.

Sam Parker-Haynes

Sorry, I guess I misunderstand how `DefineSameAsFirst` works then, I thought the whole purpose of it would be to use `temp`? I hope it's guaranteed..? Anyway, a test was indeed missing.

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Nico Hartmann
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
Gerrit-Change-Number: 7364005
Gerrit-PatchSet: 1
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Comment-Date: Thu, 08 Jan 2026 11:29:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
unsatisfied_requirement
open
diffy

Darius Mercadier (Gerrit)

unread,
Jan 8, 2026, 6:38:41 AM (24 hours ago) Jan 8
to Sam Parker-Haynes, AyeAye, Nico Hartmann, V8 LUCI CQ, was...@google.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Nico Hartmann and Sam Parker-Haynes

Darius Mercadier voted and added 3 comments

Votes added by Darius Mercadier

Code-Review+1

3 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Darius Mercadier . resolved

lgtm thanks :)

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 6244, Patchset 1: InstructionOperand temp = g.TempSimd128Register();
Emit(kArm64S128MoveReg, temp, g.UseRegister(input0));
Darius Mercadier . resolved

So I could be wrong because I get confused by UseRegister vs UseUniqueRegister every few months, but I don't think that you are guaranteed that `temp` and `g.UseRegister(input0)` don't alias. And if that happens, the `DCHECK_NE(dst, src);` you added in the code generator will trigger. I think that you need `UseUniqueRegister(input0)` instead of `UseRegister(input0)` (also in the next Emit maybe).

Sam Parker-Haynes

Ah, interesting. I do feel like the instruction selector is much harder to work with than it should be! I will try to remember this in the future, thanks.

Darius Mercadier

I do feel like the instruction selector is much harder to work with than it should be

Welcome to the club :p

Line 6246, Patchset 1: Emit(kArm64S128MoveLane | LaneSizeField::encode(32),
g.DefineSameAsFirst(node), temp, g.UseRegister(input0),
g.UseImmediate(from), g.UseImmediate(to));
Darius Mercadier . resolved

Is this covered by some tests? There is a `DCHECK_EQ(dst, i.InputSimd128Register(0).Format(f));` in the codegen when processing kArm64S128MoveLane and I think that this would require `temp` and `g.DefineSameAsFirst(node)` to alias, and I don't see how you're guaranteeing this. Please add a test.

Sam Parker-Haynes

Sorry, I guess I misunderstand how `DefineSameAsFirst` works then, I thought the whole purpose of it would be to use `temp`? I hope it's guaranteed..? Anyway, a test was indeed missing.

Darius Mercadier

Ah right, sorry I'm the one who got confused; I thought that `DefineSameAsFirst` referred to the Turboshaft input of `node` but it does indeed refer to the input of the Instruction, so you're good, nevermind :)

Open in Gerrit

Related details

Attention is currently required from:
  • Nico Hartmann
  • Sam Parker-Haynes
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
    Gerrit-Change-Number: 7364005
    Gerrit-PatchSet: 2
    Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Comment-Date: Thu, 08 Jan 2026 11:38:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
    Comment-In-Reply-To: Sam Parker-Haynes <sam.p...@arm.com>
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Sam Parker-Haynes (Gerrit)

    unread,
    Jan 8, 2026, 6:46:37 AM (24 hours ago) Jan 8
    to Matthias Liedtke, Darius Mercadier, AyeAye, Nico Hartmann, V8 LUCI CQ, was...@google.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Matthias Liedtke and Nico Hartmann

    Sam Parker-Haynes added 1 comment

    Patchset-level comments
    Sam Parker-Haynes . resolved

    Hi Matthias, could you review my simd shuffle fix please?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Matthias Liedtke
    • Nico Hartmann
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
    Gerrit-Change-Number: 7364005
    Gerrit-PatchSet: 2
    Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Jan 2026 11:46:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Matthias Liedtke (Gerrit)

    unread,
    Jan 8, 2026, 6:56:58 AM (23 hours ago) Jan 8
    to Sam Parker-Haynes, Darius Mercadier, AyeAye, Nico Hartmann, V8 LUCI CQ, was...@google.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Nico Hartmann and Sam Parker-Haynes

    Matthias Liedtke voted and added 2 comments

    Votes added by Matthias Liedtke

    Code-Review+1

    2 comments

    Patchset-level comments
    Matthias Liedtke . resolved

    LGTM

    Sam Parker-Haynes . resolved

    Hi Matthias, could you review my simd shuffle fix please?

    Matthias Liedtke

    Sorry, it's my first day after an extended leave, still trying to catch up with my inbox. 😊

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nico Hartmann
    • Sam Parker-Haynes
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
    Gerrit-Change-Number: 7364005
    Gerrit-PatchSet: 2
    Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Comment-Date: Thu, 08 Jan 2026 11:56:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Sam Parker-Haynes <sam.p...@arm.com>
    satisfied_requirement
    open
    diffy

    Sam Parker-Haynes (Gerrit)

    unread,
    Jan 8, 2026, 7:00:22 AM (23 hours ago) Jan 8
    to Matthias Liedtke, Darius Mercadier, AyeAye, Nico Hartmann, V8 LUCI CQ, was...@google.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Nico Hartmann

    Sam Parker-Haynes voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nico Hartmann
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
    Gerrit-Change-Number: 7364005
    Gerrit-PatchSet: 2
    Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Jan 2026 12:00:17 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Sam Parker-Haynes (Gerrit)

    unread,
    Jan 8, 2026, 7:08:12 AM (23 hours ago) Jan 8
    to Matthias Liedtke, Darius Mercadier, AyeAye, Nico Hartmann, V8 LUCI CQ, was...@google.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Nico Hartmann

    Sam Parker-Haynes added 1 comment

    Patchset-level comments
    Sam Parker-Haynes . resolved

    Hi Matthias, could you review my simd shuffle fix please?

    Matthias Liedtke

    Sorry, it's my first day after an extended leave, still trying to catch up with my inbox. 😊

    Sam Parker-Haynes

    No problem, I only added you ten minutes before :) Welcome back!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nico Hartmann
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
    Gerrit-Change-Number: 7364005
    Gerrit-PatchSet: 2
    Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Jan 2026 12:08:07 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Matthias Liedtke <mlie...@chromium.org>
    Comment-In-Reply-To: Sam Parker-Haynes <sam.p...@arm.com>
    satisfied_requirement
    open
    diffy

    V8 LUCI CQ (Gerrit)

    unread,
    Jan 8, 2026, 7:33:38 AM (23 hours ago) Jan 8
    to Sam Parker-Haynes, Matthias Liedtke, Darius Mercadier, AyeAye, Nico Hartmann, was...@google.com, dmercadi...@chromium.org, v8-re...@googlegroups.com

    V8 LUCI CQ submitted the change

    Change information

    Commit message:
    [compiler][arm64] Remove OneLaneSwizzle

    Introduce S128MoveReg and use that, along with MoveLane, to implement
    the same functionality in isel.
    Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
    Commit-Queue: Sam Parker-Haynes <sam.p...@arm.com>
    Reviewed-by: Darius Mercadier <dmerc...@chromium.org>
    Reviewed-by: Matthias Liedtke <mlie...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#104557}
    Files:
    • M src/compiler/backend/arm64/code-generator-arm64.cc
    • M src/compiler/backend/arm64/instruction-codes-arm64.h
    • M src/compiler/backend/arm64/instruction-scheduler-arm64.cc
    • M src/compiler/backend/arm64/instruction-selector-arm64.cc
    • M src/wasm/simd-shuffle.cc
    • M test/unittests/compiler/arm64/turboshaft-instruction-selector-arm64-unittest.cc
    Change size: M
    Delta: 6 files changed, 41 insertions(+), 17 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Darius Mercadier, +1 by Matthias Liedtke
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I9833083c9d9d59af581bdc830df41bd5e457904f
    Gerrit-Change-Number: 7364005
    Gerrit-PatchSet: 3
    Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages