mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
71 lines
2.0 KiB
Rust
71 lines
2.0 KiB
Rust
// MIR for `slice_iter_generic_is_empty` after PreCodegen
|
|
|
|
fn slice_iter_generic_is_empty(_1: &std::slice::Iter<'_, T>) -> bool {
|
|
debug it => _1;
|
|
let mut _0: bool;
|
|
scope 1 (inlined <std::slice::Iter<'_, T> as ExactSizeIterator>::is_empty) {
|
|
let mut _2: *const T;
|
|
let mut _7: *const T;
|
|
scope 2 {
|
|
let _3: std::ptr::NonNull<T>;
|
|
let _8: usize;
|
|
scope 3 {
|
|
}
|
|
scope 4 {
|
|
scope 7 (inlined <NonNull<T> as PartialEq>::eq) {
|
|
let mut _4: std::ptr::NonNull<T>;
|
|
let mut _5: *mut T;
|
|
let mut _6: *mut T;
|
|
scope 8 (inlined NonNull::<T>::as_ptr) {
|
|
}
|
|
scope 9 (inlined NonNull::<T>::as_ptr) {
|
|
}
|
|
}
|
|
}
|
|
scope 5 (inlined std::ptr::const_ptr::<impl *const T>::addr) {
|
|
scope 6 (inlined std::ptr::const_ptr::<impl *const T>::cast::<()>) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_8);
|
|
StorageLive(_7);
|
|
StorageLive(_3);
|
|
switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb1, otherwise: bb2];
|
|
}
|
|
|
|
bb1: {
|
|
StorageLive(_2);
|
|
_2 = copy ((*_1).1: *const T);
|
|
_3 = copy _2 as std::ptr::NonNull<T> (Transmute);
|
|
StorageDead(_2);
|
|
StorageLive(_5);
|
|
StorageLive(_4);
|
|
_4 = copy ((*_1).0: std::ptr::NonNull<T>);
|
|
_5 = copy _4 as *mut T (Transmute);
|
|
StorageDead(_4);
|
|
StorageLive(_6);
|
|
_6 = copy _3 as *mut T (Transmute);
|
|
_0 = Eq(copy _5, copy _6);
|
|
StorageDead(_6);
|
|
StorageDead(_5);
|
|
goto -> bb3;
|
|
}
|
|
|
|
bb2: {
|
|
_7 = copy ((*_1).1: *const T);
|
|
_8 = copy _7 as usize (Transmute);
|
|
_0 = Eq(copy _8, const 0_usize);
|
|
goto -> bb3;
|
|
}
|
|
|
|
bb3: {
|
|
StorageDead(_3);
|
|
StorageDead(_7);
|
|
StorageDead(_8);
|
|
return;
|
|
}
|
|
}
|