-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
import simd_
intrinsics
#137551
base: master
Are you sure you want to change the base?
import simd_
intrinsics
#137551
Conversation
there's a story behind |
I'm not aware of one for the fpow and fpowi ones. |
Only simd_insert and simd_extract can be used in const-eval. You can make them
Yeah that needs some highly experimental type system features so we cannot use it in core/std.
Oh that's odd, could you open an issue?
👍 |
This comment has been minimized.
This comment has been minimized.
mod types { | ||
// signed integer types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you do this unrelated refactor? Makes the review harder...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the goal of this is the rustfmt::skip
, otherwise this reformats to 3X the lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why would you format this at all?
It's generally not good to do drive-by formatting of previously unformatted files as part of an unrelated PR. That just makes the review harder than it has to be.
I've opened #137555 for the |
☔ The latest upstream changes (presumably #137573) made this pull request unmergeable. Please resolve the merge conflicts. |
Can you let me know when you rebased? (GH does not always send notifications for force-pushes.) |
4c19a70
to
f48829b
Compare
I've rebased (but not squashed yet, I'll do that at the very end) Also, this PR will give merge conflicts with the |
☔ The latest upstream changes (presumably #137608) made this pull request unmergeable. Please resolve the merge conflicts. |
bae561b
to
87b1189
Compare
I've rebased again, and undrafted because this should now not be blocked on anything |
This comment has been minimized.
This comment has been minimized.
some mingw job failed with a connection error. Is there a way to restart that job besides closing/re-opening the PR? |
instead, we can just import the intrinsics from core
87b1189
to
038f4e2
Compare
Some changes occurred to the platform-builtins intrinsics. Make sure the cc @antoyo, @GuillaumeGomez, @bjorn3, @calebzulawski, @programmerjake Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval |
I will approve this now since I like the cleanup. However, in the future, please respect the time of reviewers and do not perform any drive-by formatting changes. @bors r+ |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
In most cases, we can import the simd intrinsics rather than redeclare them. Apparently, most of these tests were written before
std::intrinsics::simd
existed.There are a couple of exceptions where we can't yet import:
const fn
in the standard library, causing issues in theconst-eval
testssimd_shuffle_generic
function is not exposed fromstd::intrinsics
simd_fpow
andsimd_fpowi
functions are not exposed fromstd::intrinsics
(removed in removesimd_fpow
andsimd_fpowi
#137595)no_core
, and therefore cannot usestd::intrinsics
r? @RalfJung
cc @workingjubilee do you have context on why some intrinsics are not exposed?