[compiler][arm64] I32x4DotI8x16S [v8/v8 : main]

0 views
Skip to first unread message

Darius Mercadier (Gerrit)

unread,
Jun 22, 2026, 5:05:21 AM (10 days ago) Jun 22
to Sam Parker-Haynes, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke and Sam Parker-Haynes

Darius Mercadier added 1 comment

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5525, Patchset 2 (Latest):void InstructionSelector::VisitI32x4DotI8x16S(OpIndex node) {
Darius Mercadier . unresolved

This is a test; please ignore it (and mark is as "resolved" when you want to land)

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
  • Sam Parker-Haynes
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 2
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Mon, 22 Jun 2026 09:05:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 22, 2026, 10:29:09 AM (9 days ago) Jun 22
to Darius Mercadier, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Sam Parker-Haynes . resolved

Hi Matthias, could you PTAL?

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 2
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Mon, 22 Jun 2026 14:29:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 22, 2026, 10:48:29 AM (9 days ago) Jun 22
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Sam Parker-Haynes

Matthias Liedtke added 2 comments

Patchset-level comments
Sam Parker-Haynes . resolved

Hi Matthias, could you PTAL?

Matthias Liedtke

Hi Sam, I have a large amount of bugs filed in my name that I have been investigating in the last few days (I did the "mistake" of adding some more validation to V8 which is now causing all kinds of issues that fuzzers find.)

I didn't really have the time yet for reviewing this in detail, but I'm reasonably concerned of the risk of this.
IIUC we match a very specific pattern in the machine optimization reducer, then we try to match that pattern much later during ISel.

It is probably rather unlikely that fuzzers will be able to generate this pattern, so this reminds me of https://chromium-review.git.corp.google.com/c/v8/v8/+/7462509.
Would this be a similar case where it's probably necessary that we make sure via some custom fuzzing logic that this pattern works as expected? While times have changed and AI has gotten much better, I'm not sure how much I'd want to rely on that?

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 6162, Patchset 2 (Latest): if (auto dot = Get(binop.left()).TryCast<Simd128BinopOp>()) {
Matthias Liedtke . unresolved

Don't we typically also check for `CanCover` to ensure we only apply the optimization if the intermediate result isn't used by other operations?

Open in Gerrit

Related details

Attention is currently required from:
  • Sam Parker-Haynes
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 2
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Mon, 22 Jun 2026 14:48:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sam Parker-Haynes <sam.p...@arm.com>
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 22, 2026, 11:13:04 AM (9 days ago) Jun 22
to Darius Mercadier, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 2 comments

Patchset-level comments
Sam Parker-Haynes . resolved

Hi Matthias, could you PTAL?

Matthias Liedtke

Hi Sam, I have a large amount of bugs filed in my name that I have been investigating in the last few days (I did the "mistake" of adding some more validation to V8 which is now causing all kinds of issues that fuzzers find.)

I didn't really have the time yet for reviewing this in detail, but I'm reasonably concerned of the risk of this.
IIUC we match a very specific pattern in the machine optimization reducer, then we try to match that pattern much later during ISel.

It is probably rather unlikely that fuzzers will be able to generate this pattern, so this reminds me of https://chromium-review.git.corp.google.com/c/v8/v8/+/7462509.
Would this be a similar case where it's probably necessary that we make sure via some custom fuzzing logic that this pattern works as expected? While times have changed and AI has gotten much better, I'm not sure how much I'd want to rely on that?

Sam Parker-Haynes

I have a large amount of bugs filed in my name

I know that feeling :)

Okay, I'll try to put something together.

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 6162, Patchset 2 (Latest): if (auto dot = Get(binop.left()).TryCast<Simd128BinopOp>()) {
Matthias Liedtke . unresolved

Don't we typically also check for `CanCover` to ensure we only apply the optimization if the intermediate result isn't used by other operations?

Sam Parker-Haynes

Argh, yes. Working in the IR has spoiled me.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 2
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Mon, 22 Jun 2026 15:12:59 +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>
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 23, 2026, 4:54:10 AM (9 days ago) Jun 23
to Darius Mercadier, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 1 comment

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 6162, Patchset 2: if (auto dot = Get(binop.left()).TryCast<Simd128BinopOp>()) {
Matthias Liedtke . resolved

Don't we typically also check for `CanCover` to ensure we only apply the optimization if the intermediate result isn't used by other operations?

Sam Parker-Haynes

Argh, yes. Working in the IR has spoiled me.

Sam Parker-Haynes

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 3
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Jun 2026 08:54:05 +0000
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 23, 2026, 6:20:50 AM (9 days ago) Jun 23
to Darius Mercadier, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Sam Parker-Haynes . resolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Jun 2026 10:20:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 23, 2026, 10:16:33 AM (8 days ago) Jun 23
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Sam Parker-Haynes

Matthias Liedtke added 1 comment

Patchset-level comments
Sam Parker-Haynes . resolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Open in Gerrit

Related details

Attention is currently required from:
  • Sam Parker-Haynes
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Tue, 23 Jun 2026 14:16:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sam Parker-Haynes <sam.p...@arm.com>
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 23, 2026, 10:22:47 AM (8 days ago) Jun 23
to Darius Mercadier, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 1 comment

Patchset-level comments
Sam Parker-Haynes . resolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Sam Parker-Haynes

It seems to stem from no AVX support. The first failed on only that specific runner and now that I've added AVX as a fuzzing bool, it fails for basically all of the x64 builders.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Jun 2026 14:22:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 23, 2026, 11:05:54 AM (8 days ago) Jun 23
to Darius Mercadier, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 1 comment

Patchset-level comments
Sam Parker-Haynes . resolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Sam Parker-Haynes

It seems to stem from no AVX support. The first failed on only that specific runner and now that I've added AVX as a fuzzing bool, it fails for basically all of the x64 builders.

Sam Parker-Haynes

I can confirm that the no-AVX results disagree with liftoff. The x64 turboshaft implementations of ExtAddPairwise seem suspicious as it looks as though the instructions overwrite their input, even though the input may have multiple users, which is one of the things I fuzz for.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Jun 2026 15:05:49 +0000
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 24, 2026, 3:38:00 AM (8 days ago) Jun 24
to Darius Mercadier, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 1 comment

Patchset-level comments
Sam Parker-Haynes . resolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Sam Parker-Haynes

It seems to stem from no AVX support. The first failed on only that specific runner and now that I've added AVX as a fuzzing bool, it fails for basically all of the x64 builders.

Sam Parker-Haynes

I can confirm that the no-AVX results disagree with liftoff. The x64 turboshaft implementations of ExtAddPairwise seem suspicious as it looks as though the instructions overwrite their input, even though the input may have multiple users, which is one of the things I fuzz for.

Sam Parker-Haynes

Do you have someone that can take a look at x64? Looking at the macroassembler it looks like ExtAddPairwise supported is predicated on AVX support (https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/x64/macro-assembler-x64.cc;drc=a9c0f953cb7441880a0fff7a245b17a000e187df;l=2291) so I'm very confused, none of it looks right to me.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 07:37:55 +0000
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 24, 2026, 4:57:31 AM (8 days ago) Jun 24
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Sam Parker-Haynes

Matthias Liedtke added 1 comment

Patchset-level comments
Sam Parker-Haynes . resolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Sam Parker-Haynes

It seems to stem from no AVX support. The first failed on only that specific runner and now that I've added AVX as a fuzzing bool, it fails for basically all of the x64 builders.

Sam Parker-Haynes

I can confirm that the no-AVX results disagree with liftoff. The x64 turboshaft implementations of ExtAddPairwise seem suspicious as it looks as though the instructions overwrite their input, even though the input may have multiple users, which is one of the things I fuzz for.

Sam Parker-Haynes

Do you have someone that can take a look at x64? Looking at the macroassembler it looks like ExtAddPairwise supported is predicated on AVX support (https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/x64/macro-assembler-x64.cc;drc=a9c0f953cb7441880a0fff7a245b17a000e187df;l=2291) so I'm very confused, none of it looks right to me.

Matthias Liedtke

In general, I'm a good candidate, I can reproduce it. Let's see if AI can resolve this for me, otherwise I'll need to see if I find some time in the next few days to take a look.

Open in Gerrit

Related details

Attention is currently required from:
  • Sam Parker-Haynes
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Wed, 24 Jun 2026 08:57:24 +0000
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 24, 2026, 5:10:10 AM (8 days ago) Jun 24
to Darius Mercadier, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 1 comment

Patchset-level comments
Sam Parker-Haynes . resolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Sam Parker-Haynes

It seems to stem from no AVX support. The first failed on only that specific runner and now that I've added AVX as a fuzzing bool, it fails for basically all of the x64 builders.

Sam Parker-Haynes

I can confirm that the no-AVX results disagree with liftoff. The x64 turboshaft implementations of ExtAddPairwise seem suspicious as it looks as though the instructions overwrite their input, even though the input may have multiple users, which is one of the things I fuzz for.

Sam Parker-Haynes

Do you have someone that can take a look at x64? Looking at the macroassembler it looks like ExtAddPairwise supported is predicated on AVX support (https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/x64/macro-assembler-x64.cc;drc=a9c0f953cb7441880a0fff7a245b17a000e187df;l=2291) so I'm very confused, none of it looks right to me.

Matthias Liedtke

In general, I'm a good candidate, I can reproduce it. Let's see if AI can resolve this for me, otherwise I'll need to see if I find some time in the next few days to take a look.

Sam Parker-Haynes

Yes, my AI friend has confirmed my isel suspicions. I will try to get the fix into this patch.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 09:10:04 +0000
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 24, 2026, 5:15:36 AM (8 days ago) Jun 24
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Sam Parker-Haynes

Matthias Liedtke added 1 comment

Patchset-level comments
Sam Parker-Haynes . unresolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Sam Parker-Haynes

It seems to stem from no AVX support. The first failed on only that specific runner and now that I've added AVX as a fuzzing bool, it fails for basically all of the x64 builders.

Sam Parker-Haynes

I can confirm that the no-AVX results disagree with liftoff. The x64 turboshaft implementations of ExtAddPairwise seem suspicious as it looks as though the instructions overwrite their input, even though the input may have multiple users, which is one of the things I fuzz for.

Sam Parker-Haynes

Do you have someone that can take a look at x64? Looking at the macroassembler it looks like ExtAddPairwise supported is predicated on AVX support (https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/x64/macro-assembler-x64.cc;drc=a9c0f953cb7441880a0fff7a245b17a000e187df;l=2291) so I'm very confused, none of it looks right to me.

Matthias Liedtke

In general, I'm a good candidate, I can reproduce it. Let's see if AI can resolve this for me, otherwise I'll need to see if I find some time in the next few days to take a look.

Sam Parker-Haynes

Yes, my AI friend has confirmed my isel suspicions. I will try to get the fix into this patch.

Matthias Liedtke

My AI fix is handling the case where `dst == src2` in `SharedMacroAssemblerBase::I16x8ExtMulHighS` for x64.
As this has nothing to do with your change, can you please upload it as a separate change? (You can then rebase this change on top of it as a dependent change)

Open in Gerrit

Related details

Attention is currently required from:
  • Sam Parker-Haynes
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Wed, 24 Jun 2026 09:15:31 +0000
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 24, 2026, 5:25:44 AM (8 days ago) Jun 24
to Darius Mercadier, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 1 comment

Patchset-level comments
Sam Parker-Haynes . unresolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Sam Parker-Haynes

It seems to stem from no AVX support. The first failed on only that specific runner and now that I've added AVX as a fuzzing bool, it fails for basically all of the x64 builders.

Sam Parker-Haynes

I can confirm that the no-AVX results disagree with liftoff. The x64 turboshaft implementations of ExtAddPairwise seem suspicious as it looks as though the instructions overwrite their input, even though the input may have multiple users, which is one of the things I fuzz for.

Sam Parker-Haynes

Do you have someone that can take a look at x64? Looking at the macroassembler it looks like ExtAddPairwise supported is predicated on AVX support (https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/x64/macro-assembler-x64.cc;drc=a9c0f953cb7441880a0fff7a245b17a000e187df;l=2291) so I'm very confused, none of it looks right to me.

Matthias Liedtke

In general, I'm a good candidate, I can reproduce it. Let's see if AI can resolve this for me, otherwise I'll need to see if I find some time in the next few days to take a look.

Sam Parker-Haynes

Yes, my AI friend has confirmed my isel suspicions. I will try to get the fix into this patch.

Matthias Liedtke

My AI fix is handling the case where `dst == src2` in `SharedMacroAssemblerBase::I16x8ExtMulHighS` for x64.
As this has nothing to do with your change, can you please upload it as a separate change? (You can then rebase this change on top of it as a dependent change)

Sam Parker-Haynes

Impressive to find two bugs, in two opcodes, from such a small test! Okay, I'll put them both in a separate patch.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 09:25:40 +0000
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 24, 2026, 5:54:20 AM (8 days ago) Jun 24
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Sam Parker-Haynes

Matthias Liedtke added 1 comment

Patchset-level comments
Sam Parker-Haynes . unresolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Sam Parker-Haynes

It seems to stem from no AVX support. The first failed on only that specific runner and now that I've added AVX as a fuzzing bool, it fails for basically all of the x64 builders.

Sam Parker-Haynes

I can confirm that the no-AVX results disagree with liftoff. The x64 turboshaft implementations of ExtAddPairwise seem suspicious as it looks as though the instructions overwrite their input, even though the input may have multiple users, which is one of the things I fuzz for.

Sam Parker-Haynes

Do you have someone that can take a look at x64? Looking at the macroassembler it looks like ExtAddPairwise supported is predicated on AVX support (https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/x64/macro-assembler-x64.cc;drc=a9c0f953cb7441880a0fff7a245b17a000e187df;l=2291) so I'm very confused, none of it looks right to me.

Matthias Liedtke

In general, I'm a good candidate, I can reproduce it. Let's see if AI can resolve this for me, otherwise I'll need to see if I find some time in the next few days to take a look.

Sam Parker-Haynes

Yes, my AI friend has confirmed my isel suspicions. I will try to get the fix into this patch.

Matthias Liedtke

My AI fix is handling the case where `dst == src2` in `SharedMacroAssemblerBase::I16x8ExtMulHighS` for x64.
As this has nothing to do with your change, can you please upload it as a separate change? (You can then rebase this change on top of it as a dependent change)

Sam Parker-Haynes

Impressive to find two bugs, in two opcodes, from such a small test! Okay, I'll put them both in a separate patch.

Matthias Liedtke

One reason why I'm not getting to anything these days is because I landed a new verification for `OpEffects` in Turboshaft (we now have randomized "resccheduling" of operations, similar to what the x64 revectorization does). I got 9 fuzzer issues filed, some were duplicates but I already fixed 3 bugs and at least one of these issues is still unresolved. 😐
So yes, any kind of validation that we didn't have before has a decent chance of flushing out issues and especially "corner case" configurations and differential fuzzing are somewhat underrepresented I think.

Thanks a lot for adding it and for looking into the x64 issues, this isn't really your core mission I assume. 😊

Open in Gerrit

Related details

Attention is currently required from:
  • Sam Parker-Haynes
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 4
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Wed, 24 Jun 2026 09:54:15 +0000
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 25, 2026, 6:12:18 AM (7 days ago) Jun 25
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Sam Parker-Haynes

Matthias Liedtke voted and added 8 comments

Votes added by Matthias Liedtke

Code-Review+1

8 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Matthias Liedtke . resolved

LGTM with comments. Thanks both for investing the time in adding some fuzzing coverage here, investigating the x86 issues and being so patient on my review! (Just assuming you were patient and not incredibly annoyed by it. 😊)

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5529, Patchset 6 (Latest): InstructionOperand left = g.UseRegister(op.left());
InstructionOperand right = g.UseRegister(op.right());
InstructionOperand acc = g.TempSimd128Register();
Matthias Liedtke . unresolved

What was the logic with temp registers again? Do we need to use `g.UseUniqueRegister` above to prevent sharing between input and temp registers or was that only for input and output registers?

File src/compiler/turboshaft/machine-optimization-reducer.h
Line 2393, Patchset 6 (Latest): if (mul_left && mul_right && mul_left->kind != mul_right->kind &&
Matthias Liedtke . unresolved

So, one of them needs be ExtMulHigh and one of them needs to be ExtMulLow. That makes sense.
Is it correct that these operations are commutative? I can clearly see that on the input operation that is the case, is it also the case when transforming this to the shuffle operations? Or would the shuffle indices need to be adapted if the mulLow vs. mulHigh input order gets commutated?
(I feel like ideally I'd be able to answer this myself but I'm always struggling with mentally visualizing these shuffle transformations... 😞)

Line 2377, Patchset 6 (Latest): auto GetExtMul = [this](OpIndex input) -> const Simd128BinopOp* {
Matthias Liedtke . unresolved
Nit:
```suggestion
auto TryCastExtMul = [this](OpIndex input) -> const Simd128BinopOp* {
```
as this is semantically the same as `input.TryCast<ExtMulLow>() ?: input.TryCast<ExtMulHigh>()`?
Line 2375, Patchset 6 (Latest): // Which, with 16-bit lanes, is equivalent to: 0, 4, 1, 5, 2, 6, 3, 7
Matthias Liedtke . resolved

Thanks for the detailed comment, I would've had no idea what I'm even looking at otherwise! 😊

File test/mjsunit/wasm/simd-dot-i8x16.js
Line 26, Patchset 6 (Latest): ...SimdInstr(kExprI16x8ExtMulLowI8x16S),
...SimdInstr(kExprI32x4ExtAddPairwiseI16x8S),
kExprLocalGet, 3,
kExprLocalGet, 4,
...SimdInstr(kExprI16x8ExtMulHighI8x16S),
...SimdInstr(kExprI32x4ExtAddPairwiseI16x8S),
Matthias Liedtke . unresolved

So maybe we can also swap this once `simd_dot_inverted` and make sure it produces the same values and that should help answering my question from above? 😊

File test/unittests/wasm/simd-cross-compiler-determinism-fuzztest.cc
Line 388, Patchset 6 (Latest): emit_extmul_pairwise(tree.left_branch);
emit_extmul_pairwise(tree.right_branch);
Matthias Liedtke . unresolved

I guess, this will also cover the commutation question I brought up above IIUC.

Line 560, Patchset 6 (Latest): bool disable_avx = !allow_avx && CpuFeatures::IsSupported(AVX);
if (disable_avx) CpuFeatures::SetUnsupported(AVX);
Matthias Liedtke . unresolved

So in general gtests can be run as a suite. I think for some reason that isn't really true for our gtests and we invoke them one by one from the `run-tests.py`(?) but I think the test case should still restore the previous state. Can you make this a scoped object that resets the AVX flag to the previous state in its destructor?

Open in Gerrit

Related details

Attention is currently required from:
  • 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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 6
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Thu, 25 Jun 2026 10:12:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 25, 2026, 7:57:43 AM (7 days ago) Jun 25
to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke

Sam Parker-Haynes added 7 comments

Patchset-level comments
Matthias Liedtke . resolved

LGTM with comments. Thanks both for investing the time in adding some fuzzing coverage here, investigating the x86 issues and being so patient on my review! (Just assuming you were patient and not incredibly annoyed by it. 😊)

Sam Parker-Haynes

Ha, thanks for the review - asking for a fuzzer was clearly wise! It also found another bug... so I will put up another CL before I can land this!

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5529, Patchset 6: InstructionOperand left = g.UseRegister(op.left());

InstructionOperand right = g.UseRegister(op.right());
InstructionOperand acc = g.TempSimd128Register();
Matthias Liedtke . unresolved

What was the logic with temp registers again? Do we need to use `g.UseUniqueRegister` above to prevent sharing between input and temp registers or was that only for input and output registers?

Sam Parker-Haynes

I can't remember the rules! One of my many gripes about V8 codegen :) I think it was for input and output registers, at least that's the only time I remember being pulled up on it. But looking at the comments in seems it's also dependent on what the code generator is doing with the operation, such as emitting multiple instructions and the input(s) are re-used across instructions. So, I don't think it's necessary here.

File src/compiler/turboshaft/machine-optimization-reducer.h
Line 2393, Patchset 6: if (mul_left && mul_right && mul_left->kind != mul_right->kind &&
Matthias Liedtke . unresolved

So, one of them needs be ExtMulHigh and one of them needs to be ExtMulLow. That makes sense.
Is it correct that these operations are commutative? I can clearly see that on the input operation that is the case, is it also the case when transforming this to the shuffle operations? Or would the shuffle indices need to be adapted if the mulLow vs. mulHigh input order gets commutated?
(I feel like ideally I'd be able to answer this myself but I'm always struggling with mentally visualizing these shuffle transformations... 😞)

Sam Parker-Haynes

It doesn't matter whether low/high is on the left or right, but it does matter that they continue to be on the left and right going into the Dot.

Line 2377, Patchset 6: auto GetExtMul = [this](OpIndex input) -> const Simd128BinopOp* {
Matthias Liedtke . resolved
Nit:
```suggestion
auto TryCastExtMul = [this](OpIndex input) -> const Simd128BinopOp* {
```
as this is semantically the same as `input.TryCast<ExtMulLow>() ?: input.TryCast<ExtMulHigh>()`?
Sam Parker-Haynes

Done

File test/mjsunit/wasm/simd-dot-i8x16.js
Line 26, Patchset 6: ...SimdInstr(kExprI16x8ExtMulLowI8x16S),

...SimdInstr(kExprI32x4ExtAddPairwiseI16x8S),
kExprLocalGet, 3,
kExprLocalGet, 4,
...SimdInstr(kExprI16x8ExtMulHighI8x16S),
...SimdInstr(kExprI32x4ExtAddPairwiseI16x8S),
Matthias Liedtke . resolved

So maybe we can also swap this once `simd_dot_inverted` and make sure it produces the same values and that should help answering my question from above? 😊

Sam Parker-Haynes

Added a new function.

File test/unittests/wasm/simd-cross-compiler-determinism-fuzztest.cc
Line 388, Patchset 6: emit_extmul_pairwise(tree.left_branch);
emit_extmul_pairwise(tree.right_branch);
Matthias Liedtke . resolved

I guess, this will also cover the commutation question I brought up above IIUC.

Sam Parker-Haynes

Hopefully :)

Line 560, Patchset 6: bool disable_avx = !allow_avx && CpuFeatures::IsSupported(AVX);
if (disable_avx) CpuFeatures::SetUnsupported(AVX);
Matthias Liedtke . unresolved

So in general gtests can be run as a suite. I think for some reason that isn't really true for our gtests and we invoke them one by one from the `run-tests.py`(?) but I think the test case should still restore the previous state. Can you make this a scoped object that resets the AVX flag to the previous state in its destructor?

Sam Parker-Haynes

I think I've done what you've asked for.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 6
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Jun 2026 11:57:38 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 25, 2026, 8:24:31 AM (7 days ago) Jun 25
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Sam Parker-Haynes

Matthias Liedtke voted and added 5 comments

Votes added by Matthias Liedtke

Code-Review+1

5 comments

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5525, Patchset 2:void InstructionSelector::VisitI32x4DotI8x16S(OpIndex node) {
Darius Mercadier . resolved

This is a test; please ignore it (and mark is as "resolved" when you want to land)

Matthias Liedtke

Acknowledged

Line 5529, Patchset 6: InstructionOperand left = g.UseRegister(op.left());
InstructionOperand right = g.UseRegister(op.right());
InstructionOperand acc = g.TempSimd128Register();
Matthias Liedtke . unresolved

What was the logic with temp registers again? Do we need to use `g.UseUniqueRegister` above to prevent sharing between input and temp registers or was that only for input and output registers?

Sam Parker-Haynes

I can't remember the rules! One of my many gripes about V8 codegen :) I think it was for input and output registers, at least that's the only time I remember being pulled up on it. But looking at the comments in seems it's also dependent on what the code generator is doing with the operation, such as emitting multiple instructions and the input(s) are re-used across instructions. So, I don't think it's necessary here.

Matthias Liedtke

Me neither. The problem is that this is so hard to verify...
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/compiler/backend/x64/instruction-selector-x64.cc;l=5633;drc=18b4ac79d20301512a20271e9735cd06ff515a0b
sounds like at least at some point someone thought that we might need to use `UseUniqueRegister` so that they don't alias with temp registers?

File src/compiler/turboshaft/machine-optimization-reducer.h
Line 2393, Patchset 6: if (mul_left && mul_right && mul_left->kind != mul_right->kind &&
Matthias Liedtke . resolved

So, one of them needs be ExtMulHigh and one of them needs to be ExtMulLow. That makes sense.
Is it correct that these operations are commutative? I can clearly see that on the input operation that is the case, is it also the case when transforming this to the shuffle operations? Or would the shuffle indices need to be adapted if the mulLow vs. mulHigh input order gets commutated?
(I feel like ideally I'd be able to answer this myself but I'm always struggling with mentally visualizing these shuffle transformations... 😞)

Sam Parker-Haynes

It doesn't matter whether low/high is on the left or right, but it does matter that they continue to be on the left and right going into the Dot.

Matthias Liedtke

Thanks for clarifying

File test/unittests/wasm/simd-cross-compiler-determinism-fuzztest.cc
Line 39, Patchset 7 (Latest): bool disable_ = false;
explicit AVXSupport(bool allow) : disable_(!allow) {
if (disable_) CpuFeatures::SetUnsupported(AVX);
}
~AVXSupport() {
if (disable_) CpuFeatures::SetSupported(AVX);
}
};
Matthias Liedtke . unresolved
```suggestion
bool previous_;
explicit AVXSupport(bool allow) : previous_(CpuFeatures::IsSupported(AVX)) {
if (!allow) CpuFeatures::SetUnsupported(AVX);
}
~AVXSupport() {
if(previous_) {
CpuFeatures::SetSupported(AVX);
}
}
};
```
Right now if we enter with AVX disabled, and you call `AVXSupport(false)`, we'd enable it afterwards?
Line 560, Patchset 6: bool disable_avx = !allow_avx && CpuFeatures::IsSupported(AVX);
if (disable_avx) CpuFeatures::SetUnsupported(AVX);
Matthias Liedtke . resolved

So in general gtests can be run as a suite. I think for some reason that isn't really true for our gtests and we invoke them one by one from the `run-tests.py`(?) but I think the test case should still restore the previous state. Can you make this a scoped object that resets the AVX flag to the previous state in its destructor?

Sam Parker-Haynes

I think I've done what you've asked for.

Matthias Liedtke

I added a comment on the implementation.

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • 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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 7
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Thu, 25 Jun 2026 12:24:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 25, 2026, 9:19:19 AM (7 days ago) Jun 25
to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Matthias Liedtke

Sam Parker-Haynes added 2 comments

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5529, Patchset 6: InstructionOperand left = g.UseRegister(op.left());
InstructionOperand right = g.UseRegister(op.right());
InstructionOperand acc = g.TempSimd128Register();
Matthias Liedtke . unresolved

What was the logic with temp registers again? Do we need to use `g.UseUniqueRegister` above to prevent sharing between input and temp registers or was that only for input and output registers?

Sam Parker-Haynes

I can't remember the rules! One of my many gripes about V8 codegen :) I think it was for input and output registers, at least that's the only time I remember being pulled up on it. But looking at the comments in seems it's also dependent on what the code generator is doing with the operation, such as emitting multiple instructions and the input(s) are re-used across instructions. So, I don't think it's necessary here.

Matthias Liedtke

Me neither. The problem is that this is so hard to verify...
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/compiler/backend/x64/instruction-selector-x64.cc;l=5633;drc=18b4ac79d20301512a20271e9735cd06ff515a0b
sounds like at least at some point someone thought that we might need to use `UseUniqueRegister` so that they don't alias with temp registers?

Sam Parker-Haynes

I think that's because it's passing a bunch of unassigned registers to the code generator to use. But in this case the temp register is being defined and then will be written over. Otherwise I don't see how Temp registers could ever be used instead of Unique..? I don't suppose we have a register allocation stress tester..?

File test/unittests/wasm/simd-cross-compiler-determinism-fuzztest.cc
Line 39, Patchset 7: bool disable_ = false;

explicit AVXSupport(bool allow) : disable_(!allow) {
if (disable_) CpuFeatures::SetUnsupported(AVX);
}
~AVXSupport() {
if (disable_) CpuFeatures::SetSupported(AVX);
}
};
Matthias Liedtke . resolved
```suggestion
bool previous_;
explicit AVXSupport(bool allow) : previous_(CpuFeatures::IsSupported(AVX)) {
if (!allow) CpuFeatures::SetUnsupported(AVX);
}
~AVXSupport() {
if(previous_) {
CpuFeatures::SetSupported(AVX);
}
}
};
```
Right now if we enter with AVX disabled, and you call `AVXSupport(false)`, we'd enable it afterwards?
Sam Parker-Haynes

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 7
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Jun 2026 13:19:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 25, 2026, 9:23:02 AM (6 days ago) Jun 25
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Sam Parker-Haynes

Matthias Liedtke voted and added 1 comment

Votes added by Matthias Liedtke

Code-Review+1

1 comment

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5529, Patchset 6: InstructionOperand left = g.UseRegister(op.left());
InstructionOperand right = g.UseRegister(op.right());
InstructionOperand acc = g.TempSimd128Register();
Matthias Liedtke . unresolved

What was the logic with temp registers again? Do we need to use `g.UseUniqueRegister` above to prevent sharing between input and temp registers or was that only for input and output registers?

Sam Parker-Haynes

I can't remember the rules! One of my many gripes about V8 codegen :) I think it was for input and output registers, at least that's the only time I remember being pulled up on it. But looking at the comments in seems it's also dependent on what the code generator is doing with the operation, such as emitting multiple instructions and the input(s) are re-used across instructions. So, I don't think it's necessary here.

Matthias Liedtke

Me neither. The problem is that this is so hard to verify...
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/compiler/backend/x64/instruction-selector-x64.cc;l=5633;drc=18b4ac79d20301512a20271e9735cd06ff515a0b
sounds like at least at some point someone thought that we might need to use `UseUniqueRegister` so that they don't alias with temp registers?

Sam Parker-Haynes

I think that's because it's passing a bunch of unassigned registers to the code generator to use. But in this case the temp register is being defined and then will be written over. Otherwise I don't see how Temp registers could ever be used instead of Unique..? I don't suppose we have a register allocation stress tester..?

Matthias Liedtke

I think the only thing that finds register allocation bugs are fuzzers and LLMs, I don't think we have a way to stress-test register allocation decisions.

@dmerc...@chromium.org: Can you say with confidence whether `g.useRegister(input)` + `g.TempRegister()` could end up aliasing or not?

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • 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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 8
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Thu, 25 Jun 2026 13:22:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
Jun 30, 2026, 4:32:43 AM (yesterday) Jun 30
to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Matthias Liedtke

Sam Parker-Haynes added 1 comment

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5529, Patchset 6: InstructionOperand left = g.UseRegister(op.left());
InstructionOperand right = g.UseRegister(op.right());
InstructionOperand acc = g.TempSimd128Register();
Matthias Liedtke . unresolved

What was the logic with temp registers again? Do we need to use `g.UseUniqueRegister` above to prevent sharing between input and temp registers or was that only for input and output registers?

Sam Parker-Haynes

I can't remember the rules! One of my many gripes about V8 codegen :) I think it was for input and output registers, at least that's the only time I remember being pulled up on it. But looking at the comments in seems it's also dependent on what the code generator is doing with the operation, such as emitting multiple instructions and the input(s) are re-used across instructions. So, I don't think it's necessary here.

Matthias Liedtke

Me neither. The problem is that this is so hard to verify...
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/compiler/backend/x64/instruction-selector-x64.cc;l=5633;drc=18b4ac79d20301512a20271e9735cd06ff515a0b
sounds like at least at some point someone thought that we might need to use `UseUniqueRegister` so that they don't alias with temp registers?

Sam Parker-Haynes

I think that's because it's passing a bunch of unassigned registers to the code generator to use. But in this case the temp register is being defined and then will be written over. Otherwise I don't see how Temp registers could ever be used instead of Unique..? I don't suppose we have a register allocation stress tester..?

Matthias Liedtke

I think the only thing that finds register allocation bugs are fuzzers and LLMs, I don't think we have a way to stress-test register allocation decisions.

@dmerc...@chromium.org: Can you say with confidence whether `g.useRegister(input)` + `g.TempRegister()` could end up aliasing or not?

Sam Parker-Haynes
Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 9
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Tue, 30 Jun 2026 08:32:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Darius Mercadier (Gerrit)

unread,
7:15 AM (14 hours ago) 7:15 AM
to Sam Parker-Haynes, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke and Sam Parker-Haynes

Darius Mercadier added 2 comments

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

Sorry for the delay, I missed this CL :/

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5529, Patchset 6: InstructionOperand left = g.UseRegister(op.left());
InstructionOperand right = g.UseRegister(op.right());
InstructionOperand acc = g.TempSimd128Register();
Matthias Liedtke . unresolved

What was the logic with temp registers again? Do we need to use `g.UseUniqueRegister` above to prevent sharing between input and temp registers or was that only for input and output registers?

Sam Parker-Haynes

I can't remember the rules! One of my many gripes about V8 codegen :) I think it was for input and output registers, at least that's the only time I remember being pulled up on it. But looking at the comments in seems it's also dependent on what the code generator is doing with the operation, such as emitting multiple instructions and the input(s) are re-used across instructions. So, I don't think it's necessary here.

Matthias Liedtke

Me neither. The problem is that this is so hard to verify...
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/compiler/backend/x64/instruction-selector-x64.cc;l=5633;drc=18b4ac79d20301512a20271e9735cd06ff515a0b
sounds like at least at some point someone thought that we might need to use `UseUniqueRegister` so that they don't alias with temp registers?

Sam Parker-Haynes

I think that's because it's passing a bunch of unassigned registers to the code generator to use. But in this case the temp register is being defined and then will be written over. Otherwise I don't see how Temp registers could ever be used instead of Unique..? I don't suppose we have a register allocation stress tester..?

Matthias Liedtke

I think the only thing that finds register allocation bugs are fuzzers and LLMs, I don't think we have a way to stress-test register allocation decisions.

@dmerc...@chromium.org: Can you say with confidence whether `g.useRegister(input)` + `g.TempRegister()` could end up aliasing or not?

Sam Parker-Haynes

Ping @dmerc...@chromium.org

Darius Mercadier

Can you say with confidence whether g.useRegister(input) + g.TempRegister() could end up aliasing or not?

I am _pretty_ sure that they can alias yes. And indeed it would mean that you need a `useUniqueRegister` for both `left` and `right` to make sure that they don't alias with `acc`.

This matches what the x64 instruction selector does.

I also asked Gemini just in case, and it agrees that they can alias, but I'm not familiar enough with the register allocator to judge whether Gemini's explanation makes sense or not 😄

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
  • 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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 9
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Wed, 01 Jul 2026 11:14:56 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
7:20 AM (14 hours ago) 7:20 AM
to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Matthias Liedtke

Sam Parker-Haynes added 1 comment

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5529, Patchset 6: InstructionOperand left = g.UseRegister(op.left());
InstructionOperand right = g.UseRegister(op.right());
InstructionOperand acc = g.TempSimd128Register();
Matthias Liedtke . unresolved

What was the logic with temp registers again? Do we need to use `g.UseUniqueRegister` above to prevent sharing between input and temp registers or was that only for input and output registers?

Sam Parker-Haynes

I can't remember the rules! One of my many gripes about V8 codegen :) I think it was for input and output registers, at least that's the only time I remember being pulled up on it. But looking at the comments in seems it's also dependent on what the code generator is doing with the operation, such as emitting multiple instructions and the input(s) are re-used across instructions. So, I don't think it's necessary here.

Matthias Liedtke

Me neither. The problem is that this is so hard to verify...
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/compiler/backend/x64/instruction-selector-x64.cc;l=5633;drc=18b4ac79d20301512a20271e9735cd06ff515a0b
sounds like at least at some point someone thought that we might need to use `UseUniqueRegister` so that they don't alias with temp registers?

Sam Parker-Haynes

I think that's because it's passing a bunch of unassigned registers to the code generator to use. But in this case the temp register is being defined and then will be written over. Otherwise I don't see how Temp registers could ever be used instead of Unique..? I don't suppose we have a register allocation stress tester..?

Matthias Liedtke

I think the only thing that finds register allocation bugs are fuzzers and LLMs, I don't think we have a way to stress-test register allocation decisions.

@dmerc...@chromium.org: Can you say with confidence whether `g.useRegister(input)` + `g.TempRegister()` could end up aliasing or not?

Sam Parker-Haynes

Ping @dmerc...@chromium.org

Darius Mercadier

Can you say with confidence whether g.useRegister(input) + g.TempRegister() could end up aliasing or not?

I am _pretty_ sure that they can alias yes. And indeed it would mean that you need a `useUniqueRegister` for both `left` and `right` to make sure that they don't alias with `acc`.

This matches what the x64 instruction selector does.

I also asked Gemini just in case, and it agrees that they can alias, but I'm not familiar enough with the register allocator to judge whether Gemini's explanation makes sense or not 😄

Sam Parker-Haynes

Damn, thanks. So when is it safe to use `TempSimd128Register`..?

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 9
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Wed, 01 Jul 2026 11:20:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
7:36 AM (14 hours ago) 7:36 AM
to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Matthias Liedtke

Sam Parker-Haynes added 1 comment

File src/compiler/backend/arm64/instruction-selector-arm64.cc
Line 5529, Patchset 6: InstructionOperand left = g.UseRegister(op.left());
InstructionOperand right = g.UseRegister(op.right());
InstructionOperand acc = g.TempSimd128Register();
Matthias Liedtke . resolved

What was the logic with temp registers again? Do we need to use `g.UseUniqueRegister` above to prevent sharing between input and temp registers or was that only for input and output registers?

Sam Parker-Haynes

I can't remember the rules! One of my many gripes about V8 codegen :) I think it was for input and output registers, at least that's the only time I remember being pulled up on it. But looking at the comments in seems it's also dependent on what the code generator is doing with the operation, such as emitting multiple instructions and the input(s) are re-used across instructions. So, I don't think it's necessary here.

Matthias Liedtke

Me neither. The problem is that this is so hard to verify...
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/compiler/backend/x64/instruction-selector-x64.cc;l=5633;drc=18b4ac79d20301512a20271e9735cd06ff515a0b
sounds like at least at some point someone thought that we might need to use `UseUniqueRegister` so that they don't alias with temp registers?

Sam Parker-Haynes

I think that's because it's passing a bunch of unassigned registers to the code generator to use. But in this case the temp register is being defined and then will be written over. Otherwise I don't see how Temp registers could ever be used instead of Unique..? I don't suppose we have a register allocation stress tester..?

Matthias Liedtke

I think the only thing that finds register allocation bugs are fuzzers and LLMs, I don't think we have a way to stress-test register allocation decisions.

@dmerc...@chromium.org: Can you say with confidence whether `g.useRegister(input)` + `g.TempRegister()` could end up aliasing or not?

Sam Parker-Haynes

Ping @dmerc...@chromium.org

Darius Mercadier

Can you say with confidence whether g.useRegister(input) + g.TempRegister() could end up aliasing or not?

I am _pretty_ sure that they can alias yes. And indeed it would mean that you need a `useUniqueRegister` for both `left` and `right` to make sure that they don't alias with `acc`.

This matches what the x64 instruction selector does.

I also asked Gemini just in case, and it agrees that they can alias, but I'm not familiar enough with the register allocator to judge whether Gemini's explanation makes sense or not 😄

Sam Parker-Haynes

Damn, thanks. So when is it safe to use `TempSimd128Register`..?

Sam Parker-Haynes

Oh, ignore... I understand.

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 10
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Wed, 01 Jul 2026 11:36:48 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Darius Mercadier (Gerrit)

unread,
7:43 AM (14 hours ago) 7:43 AM
to Sam Parker-Haynes, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke and Sam Parker-Haynes

Darius Mercadier added 5 comments

File src/compiler/turboshaft/machine-optimization-reducer.h
Line 2406, Patchset 10 (Latest): OpIndex shuffle_right = __ Simd128Shuffle(
Darius Mercadier . unresolved

V<Simd128>

Line 2404, Patchset 10 (Latest): OpIndex shuffle_left = __ Simd128Shuffle(
Darius Mercadier . unresolved

V<Simd128>

Line 2391, Patchset 9: auto mul_left = TryCastExtMul(unop_left->input());
Darius Mercadier . unresolved

Not a huge fan of this `auto` and the one next line.

Line 2390, Patchset 9: unop_left->kind == Simd128UnaryOp::Kind::kI32x4ExtAddPairwiseI16x8S) {
Darius Mercadier . unresolved

Can you match this in the `TryCast` already with an Opmask?

(if yes, then you can also remove the `unop_left->kind == unop_right->kind` check above)

Line 2377, Patchset 9: auto TryCastExtMul = [this](OpIndex input) -> const Simd128BinopOp* {
Darius Mercadier . unresolved

`V<Simd128>` (I think)

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
  • 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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 10
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Wed, 01 Jul 2026 11:43:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
9:43 AM (12 hours ago) 9:43 AM
to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Matthias Liedtke

Sam Parker-Haynes voted and added 5 comments

Votes added by Sam Parker-Haynes

Commit-Queue+1

5 comments

File src/compiler/turboshaft/machine-optimization-reducer.h
Line 2406, Patchset 10: OpIndex shuffle_right = __ Simd128Shuffle(
Darius Mercadier . resolved

V<Simd128>

Sam Parker-Haynes

Done

Line 2404, Patchset 10: OpIndex shuffle_left = __ Simd128Shuffle(
Darius Mercadier . resolved

V<Simd128>

Sam Parker-Haynes

Done

Line 2391, Patchset 9: auto mul_left = TryCastExtMul(unop_left->input());
Darius Mercadier . resolved

Not a huge fan of this `auto` and the one next line.

Sam Parker-Haynes

Done

Line 2390, Patchset 9: unop_left->kind == Simd128UnaryOp::Kind::kI32x4ExtAddPairwiseI16x8S) {
Darius Mercadier . resolved

Can you match this in the `TryCast` already with an Opmask?

(if yes, then you can also remove the `unop_left->kind == unop_right->kind` check above)

Sam Parker-Haynes

I've folded all of this into the helper function.

Line 2377, Patchset 9: auto TryCastExtMul = [this](OpIndex input) -> const Simd128BinopOp* {
Darius Mercadier . resolved

`V<Simd128>` (I think)

Sam Parker-Haynes

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Matthias Liedtke
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 11
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Wed, 01 Jul 2026 13:43:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
9:50 AM (11 hours ago) 9:50 AM
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Sam Parker-Haynes

Matthias Liedtke voted and added 1 comment

Votes added by Matthias Liedtke

Code-Review+1

1 comment

File test/mjsunit/wasm/simd-dot-i8x16.js
Line 327, Patchset 11 (Latest): 12,
Matthias Liedtke . unresolved

I think there was a short time when there was some deps change that enabled formatthing for JS. Could you rebase, undo the reformatting of the newest patchset in this file, run `gclient sync` and try again to `git cl format` and hopefully it won't touch the file again?

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • 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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 11
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Wed, 01 Jul 2026 13:50:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
10:30 AM (11 hours ago) 10:30 AM
to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier

Sam Parker-Haynes added 1 comment

File test/mjsunit/wasm/simd-dot-i8x16.js
Line 327, Patchset 11: 12,
Matthias Liedtke . resolved

I think there was a short time when there was some deps change that enabled formatthing for JS. Could you rebase, undo the reformatting of the newest patchset in this file, run `gclient sync` and try again to `git cl format` and hopefully it won't touch the file again?

Sam Parker-Haynes

Ah, okay. Thought it was a strange thing to suddenly introduce. I've reverted the changes, but my gclient still isn't happy about it!

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 11
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Comment-Date: Wed, 01 Jul 2026 14:29:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Matthias Liedtke <mlie...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
10:41 AM (11 hours ago) 10:41 AM
to Sam Parker-Haynes, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Sam Parker-Haynes

Matthias Liedtke voted and added 2 comments

Votes added by Matthias Liedtke

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 12 (Latest):
Matthias Liedtke . resolved

LGTM, thanks!

File test/mjsunit/wasm/simd-dot-i8x16.js
Matthias Liedtke . resolved

I think there was a short time when there was some deps change that enabled formatthing for JS. Could you rebase, undo the reformatting of the newest patchset in this file, run `gclient sync` and try again to `git cl format` and hopefully it won't touch the file again?

Sam Parker-Haynes

Ah, okay. Thought it was a strange thing to suddenly introduce. I've reverted the changes, but my gclient still isn't happy about it!

Matthias Liedtke

Hm, I think this should be resolved soon in some way, this forced formatting doesn't work well for Wasm and is really bad for readability.
The `git cl upload --bypass-hooks` is an option that could bypass this and I think the CQ presubmit check shouldn't fail for wrongly formatted test cases but I'm not sure and certainly this isn't the intended solution. 😊

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • 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: I571805df99d80d9de2fb8d3d64b093db735b6510
Gerrit-Change-Number: 7956960
Gerrit-PatchSet: 12
Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Comment-Date: Wed, 01 Jul 2026 14:41:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Parker-Haynes (Gerrit)

unread,
10:44 AM (11 hours ago) 10:44 AM
to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier

Sam Parker-Haynes added 1 comment

Patchset-level comments
File-level comment, Patchset 4:
Sam Parker-Haynes . resolved

Hmmmm, is it possible that my fuzz test has discovered a bug?

Matthias Liedtke

Possibly, or something is wrong in the fuzztest itself? You should be able to reproduce locally and investigate the case it produces and then you could verify if this is correct or not?
Let me know if you run into any issues or need guidance on this.

Sam Parker-Haynes

It seems to stem from no AVX support. The first failed on only that specific runner and now that I've added AVX as a fuzzing bool, it fails for basically all of the x64 builders.

Sam Parker-Haynes

I can confirm that the no-AVX results disagree with liftoff. The x64 turboshaft implementations of ExtAddPairwise seem suspicious as it looks as though the instructions overwrite their input, even though the input may have multiple users, which is one of the things I fuzz for.

Sam Parker-Haynes

Do you have someone that can take a look at x64? Looking at the macroassembler it looks like ExtAddPairwise supported is predicated on AVX support (https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/x64/macro-assembler-x64.cc;drc=a9c0f953cb7441880a0fff7a245b17a000e187df;l=2291) so I'm very confused, none of it looks right to me.

Matthias Liedtke

In general, I'm a good candidate, I can reproduce it. Let's see if AI can resolve this for me, otherwise I'll need to see if I find some time in the next few days to take a look.

Sam Parker-Haynes

Yes, my AI friend has confirmed my isel suspicions. I will try to get the fix into this patch.

Matthias Liedtke

My AI fix is handling the case where `dst == src2` in `SharedMacroAssemblerBase::I16x8ExtMulHighS` for x64.
As this has nothing to do with your change, can you please upload it as a separate change? (You can then rebase this change on top of it as a dependent change)

Sam Parker-Haynes

Impressive to find two bugs, in two opcodes, from such a small test! Okay, I'll put them both in a separate patch.

Matthias Liedtke

One reason why I'm not getting to anything these days is because I landed a new verification for `OpEffects` in Turboshaft (we now have randomized "resccheduling" of operations, similar to what the x64 revectorization does). I got 9 fuzzer issues filed, some were duplicates but I already fixed 3 bugs and at least one of these issues is still unresolved. 😐
So yes, any kind of validation that we didn't have before has a decent chance of flushing out issues and especially "corner case" configurations and differential fuzzing are somewhat underrepresented I think.

Thanks a lot for adding it and for looking into the x64 issues, this isn't really your core mission I assume. 😊

Sam Parker-Haynes

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
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: I571805df99d80d9de2fb8d3d64b093db735b6510
    Gerrit-Change-Number: 7956960
    Gerrit-PatchSet: 12
    Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Jul 2026 14:44:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    open
    diffy

    Sam Parker-Haynes (Gerrit)

    unread,
    10:44 AM (11 hours ago) 10:44 AM
    to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Darius Mercadier

    Sam Parker-Haynes voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Darius Mercadier
    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: I571805df99d80d9de2fb8d3d64b093db735b6510
    Gerrit-Change-Number: 7956960
    Gerrit-PatchSet: 12
    Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Jul 2026 14:44:53 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    v8-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

    unread,
    11:31 AM (10 hours ago) 11:31 AM
    to Sam Parker-Haynes, Matthias Liedtke, Darius Mercadier, dmercadi...@chromium.org, v8-re...@googlegroups.com

    v8-s...@luci-project-accounts.iam.gserviceaccount.com submitted the change

    Change information

    Commit message:
    [compiler][arm64] I32x4DotI8x16S

    Introduce a new Dot operation which performs a lane-wise
    multiplication of sign-extended i8x16 data and then two iterations of
    pairwise addition to produce an i32x4. For Arm, we then select this to
    sdot. Matching these exact semantics is non-trivial, as WebAssembly
    doesn't include the pairwise add (without extension) that we'd need
    for the final pairwise step. So, we shuffle the inputs to maintain
    the semantics.
    Change-Id: I571805df99d80d9de2fb8d3d64b093db735b6510
    Reviewed-by: Matthias Liedtke <mlie...@chromium.org>
    Commit-Queue: Sam Parker-Haynes <sam.p...@arm.com>
    Cr-Commit-Position: refs/heads/main@{#108373}
    Files:
    • M src/compiler/backend/arm64/instruction-selector-arm64.cc
    • M src/compiler/backend/instruction-selector.cc
    • M src/compiler/opcodes.h
    • M src/compiler/turboshaft/machine-optimization-reducer.h
    • M src/compiler/turboshaft/operations.h
    • A test/mjsunit/wasm/simd-dot-i8x16.js
    • M test/unittests/compiler/arm64/turboshaft-instruction-selector-arm64-unittest.cc
    • M test/unittests/compiler/turboshaft/wasm-simd-unittest.cc
    • M test/unittests/wasm/simd-cross-compiler-determinism-fuzztest.cc
    Change size: L
    Delta: 9 files changed, 681 insertions(+), 37 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +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: I571805df99d80d9de2fb8d3d64b093db735b6510
    Gerrit-Change-Number: 7956960
    Gerrit-PatchSet: 13
    Gerrit-Owner: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages