Open
Conversation
This was accidentally removed in 713444d.
Instead of generating load/store tests based on the input filename - which no longer works given the expected input file structure of `stdarch-gen-arm` - add a simple global context option that SVE specs can set.
The `SvUndef` expression is no longer necessary as a `core::intrinsics::scalable::sve_undef` intrinsic has been introduced to produce an undefined SVE vector, used by `svundef*` intrinsics. Other intrinsics that used `SvUndef` now use the `svundef*` intrinsics.
`simd_reinterpret` was expected to be used when it was added as `transmute_unchecked` requires `Sized`, but scalable vectors are now `Sized` so `transmute_unchecked` can be used and `simd_reinterpret` was not added in rust-lang/rust#143924.
Matching the current behaviour for arguments, `auto_llvm_sign_conversion` should only be required for `as_unsigned` conversions, not `into` conversions.
This is a convenience macro used by the generated SVE intrinsics. Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com> Co-authored-by: Luca Vizzarro <Luca.Vizzarro@arm.com> Co-authored-by: Adam Gemmell <adam.gemmell@arm.com> Co-authored-by: Jacob Bramley <jacob.bramley@arm.com>
Add the SVE types (without any of the generated intrinsics) and empty modules where the generated intrinsics will be. Enables the `adt_const_params` crate feature that the generated intrinsics will use. Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com> Co-authored-by: Luca Vizzarro <Luca.Vizzarro@arm.com> Co-authored-by: Adam Gemmell <adam.gemmell@arm.com> Co-authored-by: Jacob Bramley <jacob.bramley@arm.com>
`Into::into` can't be used here because the implementations can't have the required target feature, so `SveInto` needs to be introduced and written by the generator
Thousands of lines of SVE intrinsic definitions.. Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com> Co-authored-by: Luca Vizzarro <Luca.Vizzarro@arm.com> Co-authored-by: Adam Gemmell <adam.gemmell@arm.com> Co-authored-by: Jacob Bramley <jacob.bramley@arm.com>
Following from previous commit, this commit only contains generated code from the SVE intrinsic specifications Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com> Co-authored-by: Luca Vizzarro <Luca.Vizzarro@arm.com> Co-authored-by: Adam Gemmell <adam.gemmell@arm.com> Co-authored-by: Jacob Bramley <jacob.bramley@arm.com>
Co-authored-by: Adam Gemmell <Adam.Gemmell@arm.com> Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com> Co-authored-by: Jacob Bramley <jacob.bramley@arm.com> Co-authored-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
Co-authored-by: Adam Gemmell <Adam.Gemmell@arm.com> Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com> Co-authored-by: Jacob Bramley <jacob.bramley@arm.com> Co-authored-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
With SVE intrinsics in the `arm_intrinsics.json`, the parsing needs to be updated to know to expect any new fields.
Member
Author
|
Looks like this'll need another rustc patch to skip the "scalable vectors aren't supported on this architecture" error for doc builds |
Member
Author
|
rust-lang/rust#154850 will fix this |
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 5, 2026
…, r=JonathanBrouwer ast_validation: scalable vectors okay for rustdoc Scalable vector types in `core_arch` are cfg'd for aarch64 and for rustdoc, which can successfully document these types given any `--target` (`core_arch` CI uses `i686-unknown-linux-gnu`) - this shouldn't trigger the "scalable vectors not supported on arch" error. This fixes the CI failure in rust-lang/stdarch#2071.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 5, 2026
…, r=JonathanBrouwer ast_validation: scalable vectors okay for rustdoc Scalable vector types in `core_arch` are cfg'd for aarch64 and for rustdoc, which can successfully document these types given any `--target` (`core_arch` CI uses `i686-unknown-linux-gnu`) - this shouldn't trigger the "scalable vectors not supported on arch" error. This fixes the CI failure in rust-lang/stdarch#2071.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a very large patch but the vast majority of it is generated code, the rest should be relatively straightforward to review.
This passes tests for me locally with the latest nightly after rust-lang/rust#153286 has landed.
I've bolded the commits that do the most interesting things - the rest are largely updating the support that has been partially upstreamed in the past to work with the current implementation in rustc.
stdarch-verifyfor Arm - it was accidentally removed in 713444d.sve.spec.ymlandsve2.spec.ymland instead adds a key that can be set in those files to achieve the same behaviour.SvUndefexpressions from the generator, these were used insvundefintrinsics and some others.svundefnow zeroes and so doesn't need a special generator expression, and the other uses callsvundef.simd_reinterpretin the generator totransmute_unchecked-simd_reinterpretwas expected to be added byrustc_scalable_vector(N)rust#143924 but was changed during reviews.auto-llvm-sign-conversionin the generator for return types to match what it does for arguments.auto-llvm-sign-conversionisn't used by any existing intrinsic specification files.static_assert_rangehelper that will be used in later commits.SveInto::sve_into(a trait introduced in the previous commit). This trait is necessary becausetarget_featureannotations are necessary on the trait method and that requires the method be unsafe, which is incompatible with the signature ofInto::into.stdarch-verify. Load/store tests will also be generated from these definitions.intrinsics_data/arm_intrinsics.jsonfile to add all the SVE intrinsics so thatstdarch-verifycan check all of the intrinsics are present.stdarch-verifywith the necessary support and special-cases for SVE intrinsics.intrinsic-testtool so that it can still parsearm_intrinsics.jsonand skips the SVE intrinsics.The intrinsic test tool needs a lot of changes to work with SVE and this patch is getting big as it is, so we're going to do this as a follow-up (agreed in advance with @Amanieu).
This patch is based on #1509 and I've tried to preserve the co-authorship of everyone involved in that patch.
r? @Amanieu