rust/tests/mir-opt/issue_72181.main.built.after.mir

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

80 lines
1.5 KiB
Rust
Raw Normal View History

// MIR for `main` after built
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let mut _1: usize;
let mut _3: Foo;
let mut _4: Foo;
let mut _5: u64;
let _6: usize;
let mut _7: usize;
let mut _8: bool;
scope 1 {
2023-06-06 08:47:00 -05:00
let _2: [Foo; 2];
scope 2 {
2023-06-06 08:47:00 -05:00
debug f => _2;
scope 3 {
}
scope 4 {
}
}
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
2024-02-15 19:57:24 -06:00
_1 = std::mem::size_of::<Foo>() -> [return: bb1, unwind: bb7];
}
2020-10-02 15:11:24 -05:00
bb1: {
2023-06-06 08:47:00 -05:00
PlaceMention(_1);
StorageDead(_1);
StorageLive(_2);
StorageLive(_3);
_3 = Foo { a: const 42_u64 };
StorageLive(_4);
_4 = Foo { a: const 10_u64 };
_2 = [move _3, move _4];
StorageDead(_4);
StorageDead(_3);
FakeRead(ForLet(None), _2);
StorageLive(_5);
StorageLive(_6);
_6 = const 0_usize;
_7 = Len(_2);
_8 = Lt(_6, _7);
2024-02-15 19:57:24 -06:00
assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb4, unwind: bb7];
}
2020-10-02 15:11:24 -05:00
bb2: {
2024-02-11 21:56:03 -06:00
FakeRead(ForMatchedPlace(None), _1);
unreachable;
}
bb3: {
2024-02-15 19:57:24 -06:00
goto -> bb2;
}
bb4: {
2023-06-06 08:47:00 -05:00
_5 = (_2[_6].0: u64);
PlaceMention(_5);
StorageDead(_6);
StorageDead(_5);
_0 = const ();
StorageDead(_2);
return;
}
2024-02-15 19:57:24 -06:00
bb5: {
2024-02-11 21:56:03 -06:00
FakeRead(ForMatchedPlace(None), _5);
unreachable;
}
2024-02-15 19:57:24 -06:00
bb6: {
goto -> bb5;
}
bb7 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
}
}