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>;
|
|
|
|
let mut _5: &mut std::ops::Range<usize>;
|
|
|
|
let mut _11: std::option::Option<usize>;
|
|
|
|
let mut _14: isize;
|
|
|
|
let _16: ();
|
2023-02-05 13:10:33 -06:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug iter => _4;
|
|
|
|
let _15: usize;
|
2023-02-05 13:10:33 -06:00
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug i => _15;
|
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) {
|
|
|
|
debug self => _5;
|
|
|
|
scope 5 (inlined <std::ops::Range<usize> as iter::range::RangeIteratorImpl>::spec_next) {
|
|
|
|
debug self => _5;
|
|
|
|
let mut _6: &usize;
|
|
|
|
let mut _7: &usize;
|
|
|
|
let mut _10: bool;
|
|
|
|
let _12: usize;
|
|
|
|
let mut _13: usize;
|
2023-06-01 01:08:25 -05:00
|
|
|
scope 6 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug old => _12;
|
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) {
|
|
|
|
debug self => _6;
|
|
|
|
debug other => _7;
|
|
|
|
let mut _8: usize;
|
|
|
|
let mut _9: usize;
|
2023-06-03 07:23:32 -05:00
|
|
|
}
|
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(_11);
|
|
|
|
_5 = &mut _4;
|
|
|
|
StorageLive(_12);
|
|
|
|
StorageLive(_10);
|
|
|
|
StorageLive(_6);
|
|
|
|
_6 = &((*_5).0: usize);
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = &((*_5).1: usize);
|
|
|
|
StorageLive(_8);
|
|
|
|
_8 = (*_6);
|
|
|
|
StorageLive(_9);
|
|
|
|
_9 = (*_7);
|
|
|
|
_10 = Lt(move _8, move _9);
|
|
|
|
StorageDead(_9);
|
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
|
|
|
switchInt(move _10) -> [0: bb2, otherwise: bb3];
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_11 = Option::<usize>::None;
|
|
|
|
goto -> bb5;
|
2023-06-01 01:08:25 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_12 = ((*_5).0: usize);
|
|
|
|
StorageLive(_13);
|
2023-06-23 11:53:09 -05:00
|
|
|
_13 = <usize as Step>::forward_unchecked(_12, const 1_usize) -> [return: bb4, unwind continue];
|
2023-06-01 01:08:25 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
((*_5).0: usize) = move _13;
|
|
|
|
StorageDead(_13);
|
|
|
|
_11 = Option::<usize>::Some(_12);
|
|
|
|
goto -> bb5;
|
2023-06-01 01:08:25 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_10);
|
|
|
|
StorageDead(_12);
|
|
|
|
_14 = discriminant(_11);
|
|
|
|
switchInt(move _14) -> [0: bb6, 1: bb7, otherwise: bb9];
|
2023-06-01 01:08:25 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb6: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_11);
|
|
|
|
StorageDead(_4);
|
|
|
|
return;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb7: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_15 = ((_11 as Some).0: usize);
|
2023-06-23 11:53:09 -05:00
|
|
|
_16 = opaque::<usize>(_15) -> [return: bb8, unwind continue];
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb8: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_11);
|
|
|
|
goto -> bb1;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb9: {
|
2023-06-06 08:47:00 -05:00
|
|
|
unreachable;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
}
|