-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 minnum/maxnum LLVM instrinsics for fmin/fmax #18384
Comments
(Many LLVM upgrades have happened since then.) |
LLVM’s intrinsics `minnum` and `maxnum` are now used for `min` and `max` on `f32` and `f64`. This resolves rust-lang#18384.
Add LLVM `minnum`/`maxnum` intrinsics LLVM’s intrinsics `minnum` and `maxnum` are now used for `min` and `max` on `f32` and `f64`. This resolves rust-lang#18384.
Update as of last 2017: there are still issues with optimisation of |
Cc @rust-lang/wg-codegen |
The X86 codegen issue should be fixed by llvm/llvm-project@d87eced. |
I'm not sure if there's a problem now in that we can't use intrinsics from libcore, so we'd have to move min/max to libstd: #50145. |
Relevant libcalls for minnum/maxnum: https://github.com/llvm-mirror/llvm/blob/29f026d977e01fc255284a0bb90afda1435b0e6a/include/llvm/IR/RuntimeLibcalls.def#L247-L256 |
As expected, LLVM is now properly optimising the clamp pattern. |
Use LLVM intrinsics for floating-point min/max Resurrection of #46926, now that the optimisation issues are fixed. I've confirmed locally that #61384 solves the issues. I'm not sure if we're allowed to move the `min`/`max` methods from libcore to libstd: I can't quite tell what the status is from #50145. However, this is necessary to use the intrinsics. Fixes #18384. r? @SimonSapin cc @rkruppe @nikic
The tracing_subscribe docs state that missing offsets likely mean that we're in a multithreaded context: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/time/struct.OffsetTime.html#method.local_rfc_3339 We're not in a multithreaded context at this point, but some platforms (e.g. OpenBSD) still don't have time offsets available. Since this is only a rust-analyzer debugging convenience, just use system time logging in this situation. Fixes rust-lang#18384
http://reviews.llvm.org/rL220341
Requires an LLVM upgrade, but not worth doing one just for this purpose.
The text was updated successfully, but these errors were encountered: