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.

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