rust/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.5 KiB
Rust
Raw Normal View History

2023-02-05 13:10:33 -06:00
// MIR for `vec_move` after PreCodegen
fn vec_move(_1: Vec<impl Sized>) -> () {
2023-06-06 08:47:00 -05:00
debug v => _1;
let mut _0: ();
let mut _2: std::vec::IntoIter<impl Sized>;
let mut _3: std::vec::IntoIter<impl Sized>;
let mut _4: &mut std::vec::IntoIter<impl Sized>;
let mut _5: std::option::Option<impl Sized>;
let mut _6: isize;
let _8: ();
2023-02-05 13:10:33 -06:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug iter => _3;
let _7: impl Sized;
2023-02-05 13:10:33 -06:00
scope 2 {
2023-06-06 08:47:00 -05:00
debug x => _7;
2023-02-05 13:10:33 -06:00
}
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_2);
2023-06-23 11:53:09 -05:00
_2 = <Vec<impl Sized> as IntoIterator>::into_iter(move _1) -> [return: bb1, unwind continue];
2023-02-05 13:10:33 -06:00
}
bb1: {
2023-06-06 08:47:00 -05:00
StorageLive(_3);
_3 = move _2;
goto -> bb2;
2023-02-05 13:10:33 -06:00
}
bb2: {
2023-06-06 08:47:00 -05:00
StorageLive(_5);
_4 = &mut _3;
2023-03-12 09:10:30 -05:00
_5 = <std::vec::IntoIter<impl Sized> as Iterator>::next(move _4) -> [return: bb3, unwind: bb9];
2023-02-05 13:10:33 -06:00
}
bb3: {
2023-06-06 08:47:00 -05:00
_6 = discriminant(_5);
switchInt(move _6) -> [0: bb4, 1: bb6, otherwise: bb8];
2023-02-05 13:10:33 -06:00
}
bb4: {
2023-06-06 08:47:00 -05:00
StorageDead(_5);
2023-06-23 11:53:09 -05:00
drop(_3) -> [return: bb5, unwind continue];
2023-02-05 13:10:33 -06:00
}
bb5: {
2023-06-06 08:47:00 -05:00
StorageDead(_3);
StorageDead(_2);
return;
2023-02-05 13:10:33 -06:00
}
bb6: {
2023-06-06 08:47:00 -05:00
_7 = move ((_5 as Some).0: impl Sized);
_8 = opaque::<impl Sized>(move _7) -> [return: bb7, unwind: bb9];
2023-02-05 13:10:33 -06:00
}
bb7: {
2023-06-06 08:47:00 -05:00
StorageDead(_5);
goto -> bb2;
2023-02-05 13:10:33 -06:00
}
bb8: {
2023-06-06 08:47:00 -05:00
unreachable;
2023-02-05 13:10:33 -06:00
}
bb9 (cleanup): {
2023-08-24 07:26:26 -05:00
drop(_3) -> [return: bb10, unwind terminate(cleanup)];
2023-02-05 13:10:33 -06:00
}
bb10 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
2023-02-05 13:10:33 -06:00
}
}