-
Notifications
You must be signed in to change notification settings - Fork 192
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
Do not turn on LLVM intrinsic dependency by default #206
Comments
If we can structure the code such that LLVM does a better job itself, that would be far more preferable than using intrinsics. |
I just found that
|
Fun story, me making that change was explicitly the result of looking at the implementation here in this crate and wanting the code to be more easily usable without relying on intrinsics. Hopefully at some point in the future we can lower the code to a reliable Rust intrinsic that works properly on all targets. |
AFAICT, those intrinsics are now supported by |
At the moment build script turns on a feature that uses LLVM instrinsics for additions. Unfortunately cranelift backend does not support those instinsics (and potentially other) yet, so can it be moved to an explicit feature?
num-bigint/build.rs
Lines 27 to 30 in 125fbbd
Also, one can avoid calling intrinsics at all. E.g. this PR to the Rust itself rust-lang/rust#85017 introduces a function that optimized to
add/adc
chain by LLVM and does not use any intrinsics at all (copying for completeness)The text was updated successfully, but these errors were encountered: