-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add a few MIR pre-codegen tests #111553
Add a few MIR pre-codegen tests #111553
Conversation
& (a.storage == b.storage) | ||
} | ||
|
||
// Optimizes good and have same semantics as PartialEq |
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.
Curiosity: Does this optimize better in LLVM too, or is this talking about MIR?
tests/mir-opt/pre-codegen/loops.rs
Outdated
} | ||
} | ||
|
||
pub fn vec_iter(mut v: Vec<impl Sized>) { |
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.
This means that the dropping is included; is that intentional? It seems like a distraction from the "loops" part that the filename suggests this cares about.
Also, vec's iter
and iter_mut
are the same as slice's, so I would suggest removing this part since we already have https://github.com/rust-lang/rust/blob/master/tests/mir-opt/pre-codegen/slice_iter.rs#L27.
tests/mir-opt/pre-codegen/loops.rs
Outdated
} | ||
} | ||
|
||
pub fn vec_iter_enumerate(mut v: Vec<impl Sized>) { |
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.
Similarly here, how much of the intent is Vec
relevant here? The canonical way to write this would be as &mut [impl Sized]
, so the Vec
seems like a distraction.
} | ||
} | ||
|
||
pub fn vec_move(mut v: Vec<impl Sized>) { |
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.
...since this one is the one where the Vec
-ness really does matter.
r=me, with or without the |
@bors r+ |
📌 Commit e31c4a41c1f6265690e46733c722034ce6fce8d4 has been approved by It is now in the queue for this repository. |
⌛ Testing commit e31c4a41c1f6265690e46733c722034ce6fce8d4 with merge 25932a52ef1e0e3e81e9dfcfaa114a1f2ccf9237... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
Looks like a legit failure: (r=me once blessed or whatever filters needed are added) |
@bors r=scottmcm |
📌 Commit 23e22ef6e600bc1ee5780df9648b27f8a053dddc has been approved by It is now in the queue for this repository. |
⌛ Testing commit 23e22ef6e600bc1ee5780df9648b27f8a053dddc with merge 0b28caf83947a44e6fcf23a1a40d1cd733506d41... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@bors r+ rollup=iffy (since this keeps running into conflicts with other things, let's try to get it in sooner) |
☀️ Test successful - checks-actions |
Finished benchmarking commit (774a3d1): 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)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.
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: 643.58s -> 644.915s (0.21%) |
// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 | ||
// needs-unwind | ||
// ignore-debug | ||
// only-x86_64 |
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.
Why is this only running on x86, not, say, only-64bit
?
r? @scottmcm