Fix simd_bswap for i8/u8 by calebzulawski · Pull Request #114266 · rust-lang/rus...
source link: https://github.com/rust-lang/rust/pull/114266
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Fix simd_bswap for i8/u8 #114266
Conversation
Collaborator
(rustbot has picked a reviewer for you, use r? to override) |
added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Do we expect people to be calling this intrinsic on i8xN
? This seems like a misuse of the intrinsic, or at least for LLVM, since llvm.bswap.*
says the element needs an even number of bytes.
Contributor
indeed, what are we actually trying to achieve here? |
Member
Author
This mirrors the scalar bswap intrinsic: It would be a bit of a pain to special-case i8/u8 vectors in std::simd. |
Contributor
or more precisely, what is the current behavior we're trying to avoid? |
Member
Author
I thought LLVM would handle a no-op, but instead the compiler crashes:
|
I guess r=me if @workingjubilee thinks that this is worthwhile -- the fact that we're special-casing i8 in both the simd and non-simd bswap intrinsics is a tiny bit odd, but I could believe it makes sense with like... macro-generated code or something. Still kinda sus, though.
Contributor
lmao llvm |
Member
Author
Both scalar integers and std::simd integer vectors are macro-generated No users should be seeing these intrinsics. |
To be fair to LLVM, it says very clearly that the intrinsic is only defined when |
Contributor
yeaaaaah, I guess.
that describes all of std's integer impls, baby! @bors r=compiler-errors |
added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Member
Author
The failed test is tests/ui/lint/must_not_suspend/handled.rs, I don't see any way this PR could affect that. Maybe spurious? |
Contributor
...hm yeah you're right, I misread the logs at-a-glance. Probably is spurious then. @bors r=compiler-errors |
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-author Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Contributor
Test successful - checks-actions |
Collaborator
Finished benchmarking commit (3be07c1): comparison URL. Overall result: regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results CyclesResults Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 652.418s -> 653.862s (0.22%) |
Contributor
One possible, marginal regression, nothing to worry about. @rustbot label: +perf-regression-triaged |
added the perf-regression-triaged The performance regression has been triaged. label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK