Skip to content
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

use simd_saturating_{add, sub} on neon #1575

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

folkertdev
Copy link

The idea behind this is that e.g. miri and cranelift don't know all of the llvm intrinsics (and adding them is possible but a lot of extra work). Using the generic simd function means logic only needs to be implemented once for all targets.

The simd_saturating_* functions generate the same instructions for the saturating add/sub operations https://godbolt.org/z/zc35doTc6

@rustbot
Copy link
Collaborator

rustbot commented May 30, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) some time within the next two weeks.

@Amanieu Amanieu force-pushed the neon-simd-saturating-add-sub branch from a4bc645 to 86450b2 Compare June 7, 2024 19:05
@Amanieu Amanieu enabled auto-merge (rebase) June 7, 2024 19:05
@folkertdev
Copy link
Author

I don't think this idea works because of this LLVM issue I opened llvm/llvm-project#94463. So unless we can get that fixed (or somehow accept much worse codegen) this PR does not work

@Amanieu
Copy link
Member

Amanieu commented Jun 7, 2024

OK let's defer this for now until the LLVM issue is sorted.

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