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: ();
|
2023-08-17 12:06:55 -05:00
|
|
|
let mut _3: std::ops::Range<usize>;
|
|
|
|
let mut _4: std::ops::Range<usize>;
|
2023-01-12 14:04:42 -06:00
|
|
|
let mut _5: &mut std::ops::Range<usize>;
|
2023-01-18 11:57:50 -06:00
|
|
|
let mut _13: std::option::Option<usize>;
|
|
|
|
let _15: ();
|
2023-02-05 13:10:33 -06:00
|
|
|
scope 1 {
|
2023-08-17 12:06:55 -05:00
|
|
|
debug iter => _4;
|
2023-01-18 11:57:50 -06:00
|
|
|
let _14: usize;
|
2023-02-05 13:10:33 -06:00
|
|
|
scope 2 {
|
2023-01-18 11:57:50 -06:00
|
|
|
debug i => _14;
|
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-01-12 14:04:42 -06:00
|
|
|
debug self => _5;
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 5 (inlined <std::ops::Range<usize> as iter::range::RangeIteratorImpl>::spec_next) {
|
2023-01-12 14:04:42 -06:00
|
|
|
debug self => _5;
|
|
|
|
let mut _6: &usize;
|
|
|
|
let mut _7: &usize;
|
|
|
|
let mut _10: bool;
|
2023-01-18 11:57:50 -06:00
|
|
|
let _11: usize;
|
|
|
|
let mut _12: usize;
|
2023-06-01 01:08:25 -05:00
|
|
|
scope 6 {
|
2023-01-18 11:57:50 -06:00
|
|
|
debug old => _11;
|
2023-06-01 01:08:25 -05:00
|
|
|
}
|
2024-02-27 05:57:52 -06:00
|
|
|
scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
|
2023-01-12 14:04:42 -06:00
|
|
|
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) {
|
2023-08-17 12:06:55 -05:00
|
|
|
debug self => _3;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2024-08-18 16:26:34 -05:00
|
|
|
_3 = std::ops::Range::<usize> { start: copy _1, end: copy _2 };
|
2023-08-17 12:06:55 -05:00
|
|
|
StorageLive(_4);
|
2024-08-18 16:26:34 -05:00
|
|
|
_4 = copy _3;
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb1;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageLive(_13);
|
2023-01-12 14:04:42 -06:00
|
|
|
_5 = &mut _4;
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageLive(_11);
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageLive(_10);
|
|
|
|
StorageLive(_6);
|
|
|
|
_6 = &(_4.0: usize);
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = &(_4.1: usize);
|
2023-08-17 12:06:55 -05:00
|
|
|
StorageLive(_8);
|
2024-08-18 16:26:34 -05:00
|
|
|
_8 = copy (_4.0: usize);
|
2023-08-17 12:06:55 -05:00
|
|
|
StorageLive(_9);
|
2024-08-18 16:26:34 -05:00
|
|
|
_9 = copy (_4.1: usize);
|
2023-01-12 14:04:42 -06:00
|
|
|
_10 = Lt(move _8, move _9);
|
|
|
|
StorageDead(_9);
|
|
|
|
StorageDead(_8);
|
|
|
|
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-01-12 14:04:42 -06:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageDead(_10);
|
|
|
|
StorageDead(_11);
|
|
|
|
StorageDead(_13);
|
|
|
|
StorageDead(_4);
|
|
|
|
return;
|
2023-06-01 01:08:25 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb3: {
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
2024-08-18 16:26:34 -05:00
|
|
|
_11 = copy (_4.0: usize);
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageLive(_12);
|
2024-08-18 16:26:34 -05:00
|
|
|
_12 = <usize as Step>::forward_unchecked(copy _11, 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-01-18 11:57:50 -06:00
|
|
|
(_4.0: usize) = move _12;
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageDead(_12);
|
2024-08-18 16:26:34 -05:00
|
|
|
_13 = Option::<usize>::Some(copy _11);
|
2023-01-18 11:57:50 -06:00
|
|
|
StorageDead(_10);
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageDead(_11);
|
2024-08-18 16:26:34 -05:00
|
|
|
_14 = copy ((_13 as Some).0: usize);
|
2023-01-18 11:57:50 -06:00
|
|
|
_15 = opaque::<usize>(move _14) -> [return: bb5, unwind continue];
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
2023-01-18 11:57:50 -06:00
|
|
|
bb5: {
|
|
|
|
StorageDead(_13);
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb1;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
2023-05-21 05:33:03 -05:00
|
|
|
}
|