-
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
[mir-opt] simplify Repeat
s that don't actually repeat the operand
#135322
Conversation
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
b1a6483
to
699703e
Compare
// unreachable or can't be ZST | ||
_ => false, | ||
_ => Some(false), |
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.
exhaustively match here. This branch must not have false positives given that it means "definitely not"
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.
Good point. Spurious false
is benign in how it's actually used, but that's not what the comments say, so I should re-work it. Maybe just have the wildcard be _ => None
, since that's more obviously fine, and add the known-false cases explicitly.
☔ The latest upstream changes (presumably #135274) made this pull request unmergeable. Please resolve the merge conflicts. |
7a55e8a
to
7396ec3
Compare
@rustbot ready |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (13f3924): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 3.3%, secondary 7.8%)This 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 761.42s -> 762.038s (0.08%) |
Created because when I was writing this case in GVN
https://github.com/rust-lang/rust/pull/133324/files#diff-292b215fdc6b59e3f3c4173c2270b14591c5673832fbfb05cd69a05c2ef0c30eR977-R979
I happened to notice that it worked for
[x]
but not for[x; 1]
, so figured it would be good to simplify thatRepeat
to the simplerAggregate
.