Skip to content

Simplify scalable vector testing#2188

Open
sayantn wants to merge 1 commit into
rust-lang:mainfrom
sayantn:intrinsic-test-refactors
Open

Simplify scalable vector testing#2188
sayantn wants to merge 1 commit into
rust-lang:mainfrom
sayantn:intrinsic-test-refactors

Conversation

@sayantn

@sayantn sayantn commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

For SVE types, e.g svint8_t, we can convert &svint8_t safely to &[i8] with length svcntb().
For svbool_t, it is equivalent to <vscale x 16 x i1>, so the layout is the same as an i8 array of size 2*vscale, so we can use svcntd() to convert &svbool_t to &[i8]. I used a small repr(transparent) struct with a custom Debug implementation to make the debug output nicer

This approach seems to work nicely, at least for now (it was indeed failing a few days ago, maybe some LLVM update fixed it recently)

r? @davidtwco

@sayantn
sayantn force-pushed the intrinsic-test-refactors branch 3 times, most recently from f3f413d to 6986e10 Compare July 13, 2026 22:44
@sayantn sayantn changed the title [EXPERIMENT] Simplify scalable vector testing Simplify scalable vector testing Jul 13, 2026
@sayantn
sayantn marked this pull request as ready for review July 13, 2026 22:50
@sayantn
sayantn force-pushed the intrinsic-test-refactors branch 2 times, most recently from 8ed5ec6 to 57ae2c5 Compare July 16, 2026 17:54
@sayantn
sayantn force-pushed the intrinsic-test-refactors branch from 57ae2c5 to f44dd5b Compare July 16, 2026 18:06
@rustbot

rustbot commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants