Skip to content

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

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Apr 14, 2021

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.

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.
@workingjubilee workingjubilee added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-SIMD Area: SIMD (Single Instruction Multiple Data) labels Apr 14, 2021
@rust-highfive
Copy link
Contributor

Some changes occured to rustc_codegen_cranelift

cc @bjorn3

@rust-highfive
Copy link
Contributor

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 14, 2021
@workingjubilee workingjubilee changed the title Add more SIMD math.h intrinsics Add simd_{rouns,trunc} intrinsics Apr 14, 2021
@workingjubilee workingjubilee changed the title Add simd_{rouns,trunc} intrinsics Add simd_{round,trunc} intrinsics Apr 14, 2021
@petrochenkov
Copy link
Contributor

r? @bjorn3
(I get assigned to too many PRs)

@rust-highfive rust-highfive assigned bjorn3 and unassigned petrochenkov Apr 15, 2021
@workingjubilee
Copy link
Member Author

Completely understandable. I'll pester bjorn3 directly in the future, if that's alright. :^)

@bjorn3
Copy link
Member

bjorn3 commented Apr 15, 2021

Sure, you can r? me if it isn't too complex. Otherwise I prefer if someone else takes a look too.

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 15, 2021

📌 Commit 003b8ea has been approved by bjorn3

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 15, 2021
@bors
Copy link
Collaborator

bors commented Apr 15, 2021

⌛ Testing commit 003b8ea with merge 7af1f55...

@bors
Copy link
Collaborator

bors commented Apr 16, 2021

☀️ Test successful - checks-actions
Approved by: bjorn3
Pushing 7af1f55 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 16, 2021
@bors bors merged commit 7af1f55 into rust-lang:master Apr 16, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 16, 2021
@workingjubilee workingjubilee deleted the more-simd-intrin branch April 23, 2021 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-SIMD Area: SIMD (Single Instruction Multiple Data) merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants