-
Notifications
You must be signed in to change notification settings - Fork 361
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
Implement LLVM x86 SSE4.2 intrinsics #3622
Conversation
1563021
to
6ee977c
Compare
@eduardosm you've done all the other x86 intrinsics -- can you help review this one? That would be great. :) |
@TDecking I see you've done a whole lot of back-and-forth with CI. Is running tests locally not working for you? We have instructions for that here. If that does not work, please describe your problem on Zulip; having to wait for CI adds a lot of friction so we should figure out how to get it all running on your machine. |
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.
Thanks! I never had the nerve to implement SSE4.2 string manipulation intrinsics.
I believe this is still work-in-progress, so I left some comments that I hope you find useful to get things working :)
@eduardosm Thanks for your input. The implementation is fixed and ready. |
@eduardosm Ready. |
@rustbot ready |
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.
Thanks!
I can't really review the actual implementations here, as I don't have any clue what they are even trying to implement. 😂 I think in general that's fine, since we have tests -- but to make future maintenance possible here, I ask you to please add a lot more comments. There's a bunch of concepts that are just assumed to be known here, which you have to explain -- like how a string is passed to these functions, or what the difference is between "implicit" and "explicit" (or what these terms even mean).
Also, how good is the test coverage? If someone added a random bug in the middle of one of your functions, would the tests catch that? If not, then it'd be great if you could add more tests, so that when we have to adjust this code in the future (e.g. for Miri API changes) we don't accidentally break it.
@eduardosm thanks a lot for your help with the initial review here! 💛 |
@rustbot author |
b4c1bcd
to
cae6ebe
Compare
@rustbot ready. @RalfJung I've added some additional test cases, which should cover every possible code path now. |
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.
Thanks, this helped! It does create new questions though. :)
I've also improved the documentation, but I'm not certain wether it is sufficient. To what extent may I assume that a maintainer
will google the intrinsics when performing a major refactor?
Ideally searching the web won't be needed as the code contains URLs where decent documentation can be found.
@rustbot author |
…rrors add missing Scalar::from_i128 We seem to have `from` methods for all primitive types except `i128`... let's complete the set of methods. (This came up in rust-lang/miri#3622.)
Rollup merge of rust-lang#126157 - RalfJung:scalar-i128, r=compiler-errors add missing Scalar::from_i128 We seem to have `from` methods for all primitive types except `i128`... let's complete the set of methods. (This came up in rust-lang/miri#3622.)
@rustbot ready |
I think this is good to go... I can't actually check whether all these intrinsics behave the way they should, but I guess people will complain if they see wrong results. ;) Please squash the commits. |
@RalfJung done. |
Thanks a lot for the PR and for staying with us through all the rounds of review! :-) @bors r+ |
☀️ Test successful - checks-actions |
SSE4.2 is arguably the least important SIMD extension for the x86 ISA, but it should still be supported for the sake of completeness.