-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Tell LLVM that the negation in <*const T>::sub
cannot overflow
#114720
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
Today it's just `sub` <https://rust.godbolt.org/z/8EzEPnMr5>; with this PR it's `sub nsw`.
(rustbot has picked a reviewer for you, use r? to override) |
I don't think @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit ab6e2bc with merge b4b635338cfd4b18dc878054b630903d604090f1... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (b4b635338cfd4b18dc878054b630903d604090f1): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never 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)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 632.934s -> 631.913s (-0.16%) |
One small regression that seems easily outweighed by the larger number of improvements. @rustbot label: +perf-regression-triaged |
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.
neat!
if T::IS_ZST { | ||
// Pointer arithmetic does nothing when the pointee is a ZST. | ||
self |
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.
...huh, I for some reason didn't expect that to be true.
Agreed. @bors r+ rollup |
wait I'm silly. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (b08dd92): comparison URL. Overall result: ✅ improvements - no action needed@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)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 631.476s -> 632.009s (0.08%) |
and the one regression was just noise lol. |
Today it's just
sub
https://rust.godbolt.org/z/8EzEPnMr5; with this PR it'ssub nsw
.