[mir-opt] simplify Repeats that don't actually repeat the operand#135322
[mir-opt] simplify Repeats that don't actually repeat the operand#135322bors merged 2 commits intorust-lang:masterfrom
Repeats that don't actually repeat the operand#135322Conversation
|
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
| | ty::Alias(ty::Opaque, ..) => None, | ||
| // unreachable or can't be ZST | ||
| _ => false, | ||
| _ => Some(false), |
There was a problem hiding this comment.
exhaustively match here. This branch must not have false positives given that it means "definitely not"
There was a problem hiding this comment.
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 thatRepeatto the simplerAggregate.