-
Notifications
You must be signed in to change notification settings - Fork 291
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
Add 128-bit SIMD implementation for LoongArch #592
base: master
Are you sure you want to change the base?
Conversation
BenchmarksGeneric
LSX
|
src/control/group/lsx.rs
Outdated
/// Returns a `BitMask` indicating all tags in the group which are full. | ||
#[inline] | ||
pub(crate) fn match_full(&self) -> BitMask { | ||
self.match_empty_or_deleted().invert() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be faster to use lsx_vmskgez_b
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would definitely be faster to use lsx_vmskgez_b
here. Good catch!
Blocked by rust-lang/rust#133249 |
} else if #[cfg(all( | ||
target_arch = "loongarch64", | ||
target_feature = "lsx", | ||
not(miri), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be under the "nightly" feature until loongarch intrinsics are stabilized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also going to mention this-- that way loongarch still works on stable. Although it would also be nice to have a new release so this can be used for the libstd implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. It's done.
pub(crate) const fn static_empty() -> &'static [Tag; Group::WIDTH] { | ||
#[repr(C)] | ||
struct AlignedTags { | ||
_align: [Group; 0], | ||
tags: [Tag; Group::WIDTH], | ||
} | ||
const ALIGNED_TAGS: AlignedTags = AlignedTags { | ||
_align: [], | ||
tags: [Tag::EMPTY; Group::WIDTH], | ||
}; | ||
&ALIGNED_TAGS.tags | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on the outcome of #596 you may want to add that change here as well.
☔ The latest upstream changes (presumably #597) made this pull request unmergeable. Please resolve the merge conflicts. |
fdeb358
to
4e19405
Compare
CI is green now. |
No description provided.