-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add simd_{round,trunc} intrinsics #84205
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
Conversation
LLVM supports many functions from math.h in its IR. Many of these have single-instruction variants on various platforms. So, let's add them so std::arch can use them. Yes, exact comparison is intentional: rounding must always return a valid integer-equal value, except for inf/NAN.
Some changes occured to rustc_codegen_cranelift cc @bjorn3 |
(rust-highfive has picked a reviewer for you, use r? to override) |
r? @bjorn3 |
Completely understandable. I'll pester bjorn3 directly in the future, if that's alright. :^) |
Sure, you can r? me if it isn't too complex. Otherwise I prefer if someone else takes a look too. @bors r+ |
📌 Commit 003b8ea has been approved by |
☀️ Test successful - checks-actions |
LLVM supports many functions from math.h in its IR. Many of these
have SIMD instructions on various platforms. So, let's add round and
trunc so std::arch can use them.
Yes, exact comparison is intentional: rounding must always return a
valid integer-equal value, except for inf/NAN.