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

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

110 lines
2.7 KiB
Rust
Raw Normal View History

2023-02-05 13:10:33 -06:00
// MIR for `int_range` after PreCodegen
fn int_range(_1: usize, _2: usize) -> () {
2023-06-06 08:47:00 -05:00
debug start => _1;
debug end => _2;
let mut _0: ();
let mut _3: std::ops::Range<usize>;
let mut _4: std::ops::Range<usize>;
2023-03-11 09:27:44 -06:00
let mut _8: std::option::Option<usize>;
let mut _11: isize;
let _13: ();
let mut _14: &mut std::ops::Range<usize>;
2023-02-05 13:10:33 -06:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug iter => _4;
2023-03-11 09:27:44 -06:00
let _12: usize;
2023-02-05 13:10:33 -06:00
scope 2 {
2023-03-11 09:27:44 -06:00
debug i => _12;
2023-02-05 13:10:33 -06:00
}
2023-06-06 08:47:00 -05:00
scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<usize>>::next) {
2023-03-11 09:27:44 -06:00
debug self => &_4;
2023-06-06 08:47:00 -05:00
scope 5 (inlined <std::ops::Range<usize> as iter::range::RangeIteratorImpl>::spec_next) {
2023-03-11 09:27:44 -06:00
debug self => &_4;
let mut _7: bool;
let _9: usize;
let mut _10: usize;
2023-06-01 01:08:25 -05:00
scope 6 {
2023-03-11 09:27:44 -06:00
debug old => _9;
2023-06-01 01:08:25 -05:00
scope 7 {
}
}
2023-06-06 08:47:00 -05:00
scope 8 (inlined cmp::impls::<impl PartialOrd for usize>::lt) {
2023-03-11 09:27:44 -06:00
debug self => &((*_14).0: usize);
debug other => &((*_14).1: usize);
let mut _5: usize;
let mut _6: usize;
}
2023-06-01 01:08:25 -05:00
}
2023-02-05 13:10:33 -06:00
}
}
2023-06-06 08:47:00 -05:00
scope 3 (inlined <std::ops::Range<usize> as IntoIterator>::into_iter) {
debug self => _3;
2023-02-05 13:10:33 -06:00
}
bb0: {
2023-06-06 08:47:00 -05:00
_3 = std::ops::Range::<usize> { start: _1, end: _2 };
StorageLive(_4);
_4 = move _3;
goto -> bb1;
2023-02-05 13:10:33 -06:00
}
bb1: {
2023-06-06 08:47:00 -05:00
StorageLive(_8);
StorageLive(_9);
2023-03-11 09:27:44 -06:00
StorageLive(_7);
StorageLive(_5);
_5 = (_4.0: usize);
StorageLive(_6);
_6 = (_4.1: usize);
_7 = Lt(move _5, move _6);
2023-06-06 08:47:00 -05:00
StorageDead(_6);
2023-03-11 09:27:44 -06:00
StorageDead(_5);
switchInt(move _7) -> [0: bb2, otherwise: bb3];
2023-02-05 13:10:33 -06:00
}
bb2: {
2023-03-11 09:27:44 -06:00
_8 = Option::<usize>::None;
2023-06-06 08:47:00 -05:00
goto -> bb5;
2023-06-01 01:08:25 -05:00
}
bb3: {
2023-03-11 09:27:44 -06:00
_9 = (_4.0: usize);
StorageLive(_10);
_10 = <usize as Step>::forward_unchecked(_9, const 1_usize) -> [return: bb4, unwind continue];
2023-06-01 01:08:25 -05:00
}
bb4: {
2023-03-11 09:27:44 -06:00
(_4.0: usize) = move _10;
StorageDead(_10);
_8 = Option::<usize>::Some(_9);
2023-06-06 08:47:00 -05:00
goto -> bb5;
2023-06-01 01:08:25 -05:00
}
bb5: {
2023-03-11 09:27:44 -06:00
StorageDead(_7);
StorageDead(_9);
_11 = discriminant(_8);
switchInt(move _11) -> [0: bb6, 1: bb7, otherwise: bb9];
2023-06-01 01:08:25 -05:00
}
bb6: {
2023-03-11 09:27:44 -06:00
StorageDead(_8);
2023-06-06 08:47:00 -05:00
StorageDead(_4);
return;
2023-02-05 13:10:33 -06:00
}
bb7: {
2023-03-11 09:27:44 -06:00
_12 = ((_8 as Some).0: usize);
_13 = opaque::<usize>(_12) -> [return: bb8, unwind continue];
2023-02-05 13:10:33 -06:00
}
bb8: {
2023-03-11 09:27:44 -06:00
StorageDead(_8);
2023-06-06 08:47:00 -05:00
goto -> bb1;
2023-02-05 13:10:33 -06:00
}
bb9: {
2023-06-06 08:47:00 -05:00
unreachable;
2023-02-05 13:10:33 -06:00
}
}