[arm64] Add SVE implementation of Array.indexOf() [v8/v8 : main]

4 views
Skip to first unread message

Anton Kirilov (Gerrit)

unread,
Mar 4, 2026, 7:40:15 AMMar 4
to Darius Mercadier, Michael Lippautz, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Michael Lippautz

Anton Kirilov voted and added 1 comment

Votes added by Anton Kirilov

Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Anton Kirilov . resolved

This change doesn't cause any significant performance difference on processors with 128-bit scalable vector registers, except for microbenchmarks such as `test/js-perf-test/SixSpeed/map_set_lookup/es5.js`, where there is a 3.22% and 11.24% improvement on Cortex-A725 and Cortex-X925 respectively.

However, the situation on processors with 256-bit vectors is different. The `ai-astar` benchmark in the JetStream 2.2 suite sees a 6.07% improvement on Neoverse V1, while the value for the fore-mentioned microbenchmark is 67%.

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
Gerrit-Change-Number: 7632982
Gerrit-PatchSet: 1
Gerrit-Owner: Anton Kirilov <anton....@arm.com>
Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Wed, 04 Mar 2026 12:40:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Anton Kirilov (Gerrit)

unread,
Mar 10, 2026, 11:02:19 AMMar 10
to V8 LUCI CQ, Sam Parker-Haynes, Darius Mercadier, Michael Lippautz, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Michael Lippautz

Anton Kirilov added 1 comment

Patchset-level comments
Anton Kirilov . resolved

Hello, do you have any feedback?

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
Gerrit-Change-Number: 7632982
Gerrit-PatchSet: 1
Gerrit-Owner: Anton Kirilov <anton....@arm.com>
Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Mar 2026 15:02:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Darius Mercadier (Gerrit)

unread,
Mar 10, 2026, 11:17:29 AMMar 10
to Anton Kirilov, V8 LUCI CQ, Sam Parker-Haynes, Michael Lippautz, v8-re...@googlegroups.com
Attention needed from Anton Kirilov and Michael Lippautz

Darius Mercadier added 2 comments

Patchset-level comments
Darius Mercadier . unresolved

High-level comment: we don't have any coverage for this, right? I guess that you might have machines with SVE at Arm and you checked that it works?

Would you happen to have a list of CPUs that support SVE? Or maybe rather a list of actual devices that we can buy? Are there smartphones that support it? Is it supported by M4 CPUs by any chance?

I'm not a huge fan of landing code that we can't test. So if indeed we don't have any machines with SVE support on our testing infrastructures, I'd prefer to guard this code behind a flag (or ifdef) that is false by default (and that we'll flip to true once we are able to test it).

Anton Kirilov . resolved

Hello, do you have any feedback?

Darius Mercadier

Hi Anton. Sorry for the delay, I'm a bit swamped right now. I doubt I'll have time to review this week, but I'll try to review before the end of next week.

Open in Gerrit

Related details

Attention is currently required from:
  • Anton Kirilov
  • Michael Lippautz
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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
    Gerrit-Change-Number: 7632982
    Gerrit-PatchSet: 1
    Gerrit-Owner: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Attention: Anton Kirilov <anton....@arm.com>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Comment-Date: Tue, 10 Mar 2026 15:17:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Anton Kirilov <anton....@arm.com>
    unsatisfied_requirement
    open
    diffy

    Anton Kirilov (Gerrit)

    unread,
    Mar 10, 2026, 12:04:50 PMMar 10
    to V8 LUCI CQ, Sam Parker-Haynes, Darius Mercadier, Michael Lippautz, v8-re...@googlegroups.com
    Attention needed from Darius Mercadier and Michael Lippautz

    Anton Kirilov added 1 comment

    Patchset-level comments
    Darius Mercadier . unresolved

    High-level comment: we don't have any coverage for this, right? I guess that you might have machines with SVE at Arm and you checked that it works?

    Would you happen to have a list of CPUs that support SVE? Or maybe rather a list of actual devices that we can buy? Are there smartphones that support it? Is it supported by M4 CPUs by any chance?

    I'm not a huge fan of landing code that we can't test. So if indeed we don't have any machines with SVE support on our testing infrastructures, I'd prefer to guard this code behind a flag (or ifdef) that is false by default (and that we'll flip to true once we are able to test it).

    Anton Kirilov

    Hi, Darius! No problem, I just wanted to make sure that this change hadn't slipped through the cracks.

    This is not an official endorsement, but you can find a list of SoCs and the architectural features such as SVE that they support [here](https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html). AFAIK the data is crowdsourced, so mistakes are possible, but I haven't noticed any; there are certainly gaps such as data for Google Tensor G4 and G5. In terms of actual devices, all Google Pixel phones starting with 8/8a should support SVE. Furthermore, all Google cloud instances that are based on either Google Axion or NVIDIA Grace should work too. This list is not exhaustive, of course - I just assumed that Google devices would be the easiest to obtain. However, Apple products do not support SVE AFAIK.

    If it is indeed infeasible to test these changes, then I would be happy to make them disabled by default.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Darius Mercadier
    • Michael Lippautz
    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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
    Gerrit-Change-Number: 7632982
    Gerrit-PatchSet: 1
    Gerrit-Owner: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Comment-Date: Tue, 10 Mar 2026 16:04:45 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Anton Kirilov (Gerrit)

    unread,
    Mar 10, 2026, 12:09:57 PMMar 10
    to V8 LUCI CQ, Sam Parker-Haynes, Darius Mercadier, Michael Lippautz, v8-re...@googlegroups.com
    Attention needed from Darius Mercadier and Michael Lippautz

    Anton Kirilov added 1 comment

    Patchset-level comments
    Darius Mercadier . unresolved

    High-level comment: we don't have any coverage for this, right? I guess that you might have machines with SVE at Arm and you checked that it works?

    Would you happen to have a list of CPUs that support SVE? Or maybe rather a list of actual devices that we can buy? Are there smartphones that support it? Is it supported by M4 CPUs by any chance?

    I'm not a huge fan of landing code that we can't test. So if indeed we don't have any machines with SVE support on our testing infrastructures, I'd prefer to guard this code behind a flag (or ifdef) that is false by default (and that we'll flip to true once we are able to test it).

    Anton Kirilov

    Hi, Darius! No problem, I just wanted to make sure that this change hadn't slipped through the cracks.

    This is not an official endorsement, but you can find a list of SoCs and the architectural features such as SVE that they support [here](https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html). AFAIK the data is crowdsourced, so mistakes are possible, but I haven't noticed any; there are certainly gaps such as data for Google Tensor G4 and G5. In terms of actual devices, all Google Pixel phones starting with 8/8a should support SVE. Furthermore, all Google cloud instances that are based on either Google Axion or NVIDIA Grace should work too. This list is not exhaustive, of course - I just assumed that Google devices would be the easiest to obtain. However, Apple products do not support SVE AFAIK.

    If it is indeed infeasible to test these changes, then I would be happy to make them disabled by default.

    Anton Kirilov

    Sorry, I forgot to mention that I tested the changes on 2 different platforms with different scalable vector sizes - the same machines on which I obtained the benchmark results that I stated before.

    Gerrit-Comment-Date: Tue, 10 Mar 2026 16:09:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
    Comment-In-Reply-To: Anton Kirilov <anton....@arm.com>
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Mar 24, 2026, 1:29:41 PMMar 24
    to Anton Kirilov, V8 LUCI CQ, Sam Parker-Haynes, Darius Mercadier, Michael Lippautz, v8-re...@googlegroups.com
    Attention needed from Anton Kirilov, Darius Mercadier and Michael Lippautz

    Message from chrom...@appspot.gserviceaccount.com

    😿 Job android-pixel9-pro-xl-perf/jetstream3.crossbench failed.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1561a42e090000

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Anton Kirilov
    • Darius Mercadier
    • Michael Lippautz
    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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
    Gerrit-Change-Number: 7632982
    Gerrit-PatchSet: 3
    Gerrit-Owner: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Anton Kirilov <anton....@arm.com>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Comment-Date: Tue, 24 Mar 2026 17:29:39 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Mar 26, 2026, 1:38:01 PMMar 26
    to Anton Kirilov, V8 LUCI CQ, Sam Parker-Haynes, Darius Mercadier, Michael Lippautz, v8-re...@googlegroups.com
    Attention needed from Anton Kirilov, Darius Mercadier and Michael Lippautz

    Message from chrom...@appspot.gserviceaccount.com

    📍 Job android-pixel9-perf/jetstream-main.crossbench complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/15d7b295090000

    Gerrit-Comment-Date: Thu, 26 Mar 2026 17:37:57 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Anton Kirilov (Gerrit)

    unread,
    Mar 30, 2026, 6:24:04 AMMar 30
    to chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Sam Parker-Haynes, Darius Mercadier, Michael Lippautz, v8-re...@googlegroups.com
    Attention needed from Darius Mercadier and Michael Lippautz

    Anton Kirilov voted and added 1 comment

    Votes added by Anton Kirilov

    Auto-Submit+1

    1 comment

    Patchset-level comments
    Anton Kirilov . resolved

    Hello, do you have any feedback?

    Darius Mercadier

    Hi Anton. Sorry for the delay, I'm a bit swamped right now. I doubt I'll have time to review this week, but I'll try to review before the end of next week.

    Anton Kirilov

    @dmerc...@chromium.org Hello, did you have a chance to look at the changes?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Darius Mercadier
    • Michael Lippautz
    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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
    Gerrit-Change-Number: 7632982
    Gerrit-PatchSet: 3
    Gerrit-Owner: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Comment-Date: Mon, 30 Mar 2026 10:24:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    open
    diffy

    Darius Mercadier (Gerrit)

    unread,
    Mar 30, 2026, 6:34:24 AMMar 30
    to Anton Kirilov, Patrick Thier, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Sam Parker-Haynes, v8-re...@googlegroups.com
    Attention needed from Anton Kirilov and Patrick Thier

    Darius Mercadier added 1 comment

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

    PTAL, Patrick :)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Anton Kirilov
    • Patrick Thier
    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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
    Gerrit-Change-Number: 7632982
    Gerrit-PatchSet: 3
    Gerrit-Owner: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Patrick Thier <pth...@chromium.org>
    Gerrit-Attention: Anton Kirilov <anton....@arm.com>
    Gerrit-Comment-Date: Mon, 30 Mar 2026 10:34:20 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Patrick Thier (Gerrit)

    unread,
    Mar 30, 2026, 7:10:18 AMMar 30
    to Anton Kirilov, Darius Mercadier, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Sam Parker-Haynes, v8-re...@googlegroups.com
    Attention needed from Anton Kirilov

    Patrick Thier voted and added 9 comments

    Votes added by Patrick Thier

    Code-Review+1

    9 comments

    Patchset-level comments
    Patrick Thier . resolved

    Thanks! LGTM with nits

    File src/objects/simd.cc
    Line 366, Patchset 3 (Latest): static uint64_t vector_length(void);
    Patrick Thier . unresolved

    nit: Simply `vector_length()` in C++ code.

    Line 370, Patchset 3 (Latest): static __SVBool_t all_true_predicate(void);
    Patrick Thier . unresolved

    nit: Same as above. Please remove `void`

    Line 395, Patchset 3 (Latest):__attribute__((target("sve"))) std::optional<uint64_t> find_match_in_vector(
    Patrick Thier . unresolved

    nit: Please define a small macro for that (see `TARGET_AVX2`). Applies to all methods below, just mentioning it once here.

    Line 439, Patchset 3 (Latest): static_assert(base::bits::IsPowerOfTwo(sizeof(*array)));
    Patrick Thier . unresolved

    nit: `sizeof(ScalarType)` (also other occurrences of `sizeof(*array)`

    Line 441, Patchset 3 (Latest): DCHECK_EQ(reinterpret_cast<uintptr_t>(array) % sizeof(*array), 0);
    Patrick Thier . unresolved

    nit: `DCHECK(IsAligned(...`

    Line 446, Patchset 3 (Latest): reinterpret_cast<uintptr_t>(array + start_index + vector_length) &
    ~(vector_length * sizeof(*array) - 1);
    Patrick Thier . unresolved

    nit: We have `RoundDown` in `base/macros.h`

    Line 457, Patchset 3 (Latest): while (i-- != 0) {
    Patrick Thier . unresolved

    nit: IMO a `for` loop is more readable here.

    Line 466, Patchset 3 (Latest): return (number_of_elements & (vector_length - 1)) == 0
    Patrick Thier . unresolved

    nit: `IsAligned()`

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Anton Kirilov
    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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
    Gerrit-Change-Number: 7632982
    Gerrit-PatchSet: 3
    Gerrit-Owner: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Anton Kirilov <anton....@arm.com>
    Gerrit-Comment-Date: Mon, 30 Mar 2026 11:10:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    open
    diffy

    Anton Kirilov (Gerrit)

    unread,
    Apr 8, 2026, 2:59:57 PM (9 days ago) Apr 8
    to Patrick Thier, Darius Mercadier, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Sam Parker-Haynes, v8-re...@googlegroups.com
    Attention needed from Patrick Thier

    Anton Kirilov voted and added 8 comments

    Votes added by Anton Kirilov

    Auto-Submit+1

    8 comments

    File src/objects/simd.cc
    Line 366, Patchset 3: static uint64_t vector_length(void);
    Patrick Thier . resolved

    nit: Simply `vector_length()` in C++ code.

    Anton Kirilov

    Done

    Line 370, Patchset 3: static __SVBool_t all_true_predicate(void);
    Patrick Thier . resolved

    nit: Same as above. Please remove `void`

    Anton Kirilov

    Done

    Line 395, Patchset 3:__attribute__((target("sve"))) std::optional<uint64_t> find_match_in_vector(
    Patrick Thier . resolved

    nit: Please define a small macro for that (see `TARGET_AVX2`). Applies to all methods below, just mentioning it once here.

    Anton Kirilov

    Done

    Line 439, Patchset 3: static_assert(base::bits::IsPowerOfTwo(sizeof(*array)));
    Patrick Thier . resolved

    nit: `sizeof(ScalarType)` (also other occurrences of `sizeof(*array)`

    Anton Kirilov

    Done

    Line 441, Patchset 3: DCHECK_EQ(reinterpret_cast<uintptr_t>(array) % sizeof(*array), 0);
    Patrick Thier . resolved

    nit: `DCHECK(IsAligned(...`

    Anton Kirilov

    Done

    Line 446, Patchset 3: reinterpret_cast<uintptr_t>(array + start_index + vector_length) &

    ~(vector_length * sizeof(*array) - 1);
    Patrick Thier . resolved

    nit: We have `RoundDown` in `base/macros.h`

    Anton Kirilov

    Done

    Line 457, Patchset 3: while (i-- != 0) {
    Patrick Thier . resolved

    nit: IMO a `for` loop is more readable here.

    Anton Kirilov

    Done

    Line 466, Patchset 3: return (number_of_elements & (vector_length - 1)) == 0
    Patrick Thier . resolved

    nit: `IsAligned()`

    Anton Kirilov

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Patrick Thier
    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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
    Gerrit-Change-Number: 7632982
    Gerrit-PatchSet: 5
    Gerrit-Owner: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Patrick Thier <pth...@chromium.org>
    Gerrit-Comment-Date: Wed, 08 Apr 2026 18:59:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Patrick Thier <pth...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Patrick Thier (Gerrit)

    unread,
    Apr 9, 2026, 3:38:21 AM (8 days ago) Apr 9
    to Anton Kirilov, Igor Sheludko, Darius Mercadier, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Sam Parker-Haynes, v8-re...@googlegroups.com
    Attention needed from Anton Kirilov and Igor Sheludko

    Patrick Thier voted and added 1 comment

    Votes added by Patrick Thier

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 5 (Latest):
    Patrick Thier . resolved

    LGTM ,thanks!

    +Igor as owner

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Anton Kirilov
    • Igor Sheludko
    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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
    Gerrit-Change-Number: 7632982
    Gerrit-PatchSet: 5
    Gerrit-Owner: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
    Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
    Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
    Gerrit-Reviewer: Sam Parker-Haynes <sam.p...@arm.com>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Anton Kirilov <anton....@arm.com>
    Gerrit-Comment-Date: Thu, 09 Apr 2026 07:38:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    open
    diffy

    Anton Kirilov (Gerrit)

    unread,
    Apr 9, 2026, 8:55:52 AM (8 days ago) Apr 9
    to Igor Sheludko, Patrick Thier, Darius Mercadier, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, v8-re...@googlegroups.com
    Attention needed from Darius Mercadier and Igor Sheludko

    Anton Kirilov added 1 comment

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

    High-level comment: we don't have any coverage for this, right? I guess that you might have machines with SVE at Arm and you checked that it works?

    Would you happen to have a list of CPUs that support SVE? Or maybe rather a list of actual devices that we can buy? Are there smartphones that support it? Is it supported by M4 CPUs by any chance?

    I'm not a huge fan of landing code that we can't test. So if indeed we don't have any machines with SVE support on our testing infrastructures, I'd prefer to guard this code behind a flag (or ifdef) that is false by default (and that we'll flip to true once we are able to test it).

    Anton Kirilov

    Hi, Darius! No problem, I just wanted to make sure that this change hadn't slipped through the cracks.

    This is not an official endorsement, but you can find a list of SoCs and the architectural features such as SVE that they support [here](https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html). AFAIK the data is crowdsourced, so mistakes are possible, but I haven't noticed any; there are certainly gaps such as data for Google Tensor G4 and G5. In terms of actual devices, all Google Pixel phones starting with 8/8a should support SVE. Furthermore, all Google cloud instances that are based on either Google Axion or NVIDIA Grace should work too. This list is not exhaustive, of course - I just assumed that Google devices would be the easiest to obtain. However, Apple products do not support SVE AFAIK.

    If it is indeed infeasible to test these changes, then I would be happy to make them disabled by default.

    Anton Kirilov

    Sorry, I forgot to mention that I tested the changes on 2 different platforms with different scalable vector sizes - the same machines on which I obtained the benchmark results that I stated before.

    Anton Kirilov

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Darius Mercadier
    • Igor Sheludko
    Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: v8/v8
      Gerrit-Branch: main
      Gerrit-Change-Id: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
      Gerrit-Change-Number: 7632982
      Gerrit-PatchSet: 5
      Gerrit-Owner: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
      Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
      Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
      Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
      Gerrit-Comment-Date: Thu, 09 Apr 2026 12:55:48 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Igor Sheludko (Gerrit)

      unread,
      Apr 14, 2026, 1:38:20 PM (3 days ago) Apr 14
      to Anton Kirilov, Patrick Thier, Darius Mercadier, chrom...@appspot.gserviceaccount.com, v8-s...@luci-project-accounts.iam.gserviceaccount.com, v8-re...@googlegroups.com
      Attention needed from Anton Kirilov and Darius Mercadier

      Igor Sheludko voted and added 1 comment

      Votes added by Igor Sheludko

      Code-Review+1
      Commit-Queue+2

      1 comment

      Patchset-level comments
      File-level comment, Patchset 5 (Latest):
      Igor Sheludko . resolved

      lgtm

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Anton Kirilov
      • 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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
      Gerrit-Change-Number: 7632982
      Gerrit-PatchSet: 5
      Gerrit-Owner: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
      Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
      Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
      Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
      Gerrit-Attention: Anton Kirilov <anton....@arm.com>
      Gerrit-Comment-Date: Tue, 14 Apr 2026 17:38:15 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

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

      unread,
      Apr 14, 2026, 7:22:35 PM (2 days ago) Apr 14
      to Anton Kirilov, Igor Sheludko, Patrick Thier, Darius Mercadier, chrom...@appspot.gserviceaccount.com, v8-re...@googlegroups.com

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

      Change information

      Commit message:
      [arm64] Add SVE implementation of Array.indexOf()

      The implementation is vector length-agnostic (VLA), i.e. it works
      correctly for any scalable vector register size permitted by the 64-bit
      Arm architecture.
      Change-Id: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
      Reviewed-by: Igor Sheludko <ish...@chromium.org>
      Auto-Submit: Anton Kirilov <anton....@arm.com>
      Commit-Queue: Igor Sheludko <ish...@chromium.org>
      Reviewed-by: Patrick Thier <pth...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#106476}
      Files:
      • M src/base/cpu/cpu-arm.cc
      • M src/base/cpu/cpu.h
      • M src/base/macros.h
      • M src/codegen/arm64/assembler-arm64.cc
      • M src/codegen/cpu-features.h
      • M src/objects/simd.cc
      Change size: L
      Delta: 6 files changed, 330 insertions(+), 11 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Igor Sheludko, +1 by Patrick Thier
      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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
      Gerrit-Change-Number: 7632982
      Gerrit-PatchSet: 6
      Gerrit-Owner: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
      Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
      open
      diffy
      satisfied_requirement

      Deepti Gandluri (Gerrit)

      unread,
      Apr 14, 2026, 8:20:38 PM (2 days ago) Apr 14
      to Anton Kirilov, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Igor Sheludko, Patrick Thier, Darius Mercadier, chrom...@appspot.gserviceaccount.com, v8-re...@googlegroups.com

      Deepti Gandluri has created a revert of this change

      Related details

      Attention set is empty
      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: revert
      satisfied_requirement
      open
      diffy

      Clemens Backes (Gerrit)

      unread,
      Apr 15, 2026, 4:32:27 AM (2 days ago) Apr 15
      to Anton Kirilov, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Igor Sheludko, Patrick Thier, Darius Mercadier, chrom...@appspot.gserviceaccount.com, v8-re...@googlegroups.com

      Clemens Backes added 1 comment

      Patchset-level comments
      File-level comment, Patchset 6 (Latest):
      Clemens Backes . resolved

      This also failed on the roll: https://crrev.com/c/7763830

      ```
      ../../v8/src/objects/simd.cc:57:32: error: use of undeclared identifier 'SVE'
      57 | if (CpuFeatures::IsSupported(SVE)) {
      | ^~~
      ```
      Open in Gerrit

      Related details

      Attention set is empty
      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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
      Gerrit-Change-Number: 7632982
      Gerrit-PatchSet: 6
      Gerrit-Owner: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
      Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
      Gerrit-CC: Clemens Backes <clem...@chromium.org>
      Gerrit-Comment-Date: Wed, 15 Apr 2026 08:32:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Michael Achenbach (Gerrit)

      unread,
      Apr 15, 2026, 5:07:01 AM (2 days ago) Apr 15
      to Anton Kirilov, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Clemens Backes, Igor Sheludko, Patrick Thier, Darius Mercadier, chrom...@appspot.gserviceaccount.com, v8-re...@googlegroups.com

      Michael Achenbach added 1 comment

      Patchset-level comments
      Open in Gerrit

      Related details

      Attention set is empty
      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: I56ff89a2ed47966fdd59601c410a52fe870bcbc6
      Gerrit-Change-Number: 7632982
      Gerrit-PatchSet: 6
      Gerrit-Owner: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Anton Kirilov <anton....@arm.com>
      Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
      Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
      Gerrit-CC: Clemens Backes <clem...@chromium.org>
      Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
      Gerrit-CC: Michael Achenbach <mache...@chromium.org>
      Gerrit-Comment-Date: Wed, 15 Apr 2026 09:06:56 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages