Skip to content

Convert vsli_n_* neon methods to const generics #1027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 1, 2021

Conversation

SparrowLii
Copy link
Member

@SparrowLii SparrowLii commented Mar 1, 2021

Use generic const in the following methods:
vsli_n_*
vsliq_n_*

Fixes #1017

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

vsli_n_s8_(a, b, n)
#[rustc_legacy_const_generics(2)]
pub unsafe fn vsli_n_s8<const N: i32>(a: int8x8_t, b: int8x8_t) -> int8x8_t {
assert!(0 <= N && N <= 7, "must have 0 ≤ N ≤ 7, but N = {}", N);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use static_assert! instead of assert!.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing. It has been corrected.

@SparrowLii
Copy link
Member Author

Sorry I currently only have aarch64 machines on hand, so I can't test arm and armv7 by myself. I will get them soon.

@SparrowLii SparrowLii changed the title use generic const in neon use const generics in neon Mar 1, 2021
@SparrowLii
Copy link
Member Author

In order to make the review easier, I split this pr into several parts

@SparrowLii SparrowLii changed the title use const generics in neon Convert vsli_n_* neon methods to const generics Mar 1, 2021
@Amanieu Amanieu merged commit 451a211 into rust-lang:master Mar 1, 2021
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.

LLVM ERROR when test shift and insert methods in aarch64
3 participants