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.

63 lines
3.7 KiB
Rust
Raw Normal View History

// MIR for `main` after built
fn main() -> () {
2022-11-02 16:54:49 -05:00
let mut _0: (); // return place in scope 0 at $DIR/issue_72181.rs:+0:11: +0:11
let mut _1: usize; // in scope 0 at $DIR/issue_72181.rs:+1:13: +1:34
let mut _3: Foo; // in scope 0 at $DIR/issue_72181.rs:+3:14: +3:27
let mut _4: Foo; // in scope 0 at $DIR/issue_72181.rs:+3:29: +3:42
let mut _5: u64; // in scope 0 at $DIR/issue_72181.rs:+4:13: +4:30
let _6: usize; // in scope 0 at $DIR/issue_72181.rs:+4:24: +4:25
let mut _7: usize; // in scope 0 at $DIR/issue_72181.rs:+4:22: +4:26
let mut _8: bool; // in scope 0 at $DIR/issue_72181.rs:+4:22: +4:26
scope 1 {
2022-11-02 16:54:49 -05:00
let _2: [Foo; 2]; // in scope 1 at $DIR/issue_72181.rs:+3:9: +3:10
scope 2 {
2022-11-02 16:54:49 -05:00
debug f => _2; // in scope 2 at $DIR/issue_72181.rs:+3:9: +3:10
scope 3 {
}
scope 4 {
}
}
}
bb0: {
2022-11-02 16:54:49 -05:00
StorageLive(_1); // scope 0 at $DIR/issue_72181.rs:+1:13: +1:34
_1 = std::mem::size_of::<Foo>() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue_72181.rs:+1:13: +1:34
// mir::Constant
2022-11-02 16:54:49 -05:00
// + span: $DIR/issue_72181.rs:24:13: 24:32
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: fn() -> usize {std::mem::size_of::<Foo>}, val: Value(<ZST>) }
}
2020-10-02 15:11:24 -05:00
bb1: {
2022-11-02 16:54:49 -05:00
StorageDead(_1); // scope 0 at $DIR/issue_72181.rs:+1:34: +1:35
StorageLive(_2); // scope 1 at $DIR/issue_72181.rs:+3:9: +3:10
StorageLive(_3); // scope 1 at $DIR/issue_72181.rs:+3:14: +3:27
_3 = Foo { a: const 42_u64 }; // scope 1 at $DIR/issue_72181.rs:+3:14: +3:27
StorageLive(_4); // scope 1 at $DIR/issue_72181.rs:+3:29: +3:42
_4 = Foo { a: const 10_u64 }; // scope 1 at $DIR/issue_72181.rs:+3:29: +3:42
_2 = [move _3, move _4]; // scope 1 at $DIR/issue_72181.rs:+3:13: +3:43
StorageDead(_4); // scope 1 at $DIR/issue_72181.rs:+3:42: +3:43
StorageDead(_3); // scope 1 at $DIR/issue_72181.rs:+3:42: +3:43
FakeRead(ForLet(None), _2); // scope 1 at $DIR/issue_72181.rs:+3:9: +3:10
StorageLive(_5); // scope 2 at $DIR/issue_72181.rs:+4:13: +4:30
StorageLive(_6); // scope 4 at $DIR/issue_72181.rs:+4:24: +4:25
_6 = const 0_usize; // scope 4 at $DIR/issue_72181.rs:+4:24: +4:25
_7 = Len(_2); // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26
_8 = Lt(_6, _7); // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26
assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb2, unwind: bb3]; // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26
}
2020-10-02 15:11:24 -05:00
bb2: {
2022-11-02 16:54:49 -05:00
_5 = (_2[_6].0: u64); // scope 4 at $DIR/issue_72181.rs:+4:22: +4:28
StorageDead(_6); // scope 2 at $DIR/issue_72181.rs:+4:30: +4:31
StorageDead(_5); // scope 2 at $DIR/issue_72181.rs:+4:30: +4:31
_0 = const (); // scope 0 at $DIR/issue_72181.rs:+0:11: +5:2
StorageDead(_2); // scope 1 at $DIR/issue_72181.rs:+5:1: +5:2
return; // scope 0 at $DIR/issue_72181.rs:+5:2: +5:2
}
2020-10-02 15:11:24 -05:00
bb3 (cleanup): {
2022-11-02 16:54:49 -05:00
resume; // scope 0 at $DIR/issue_72181.rs:+0:1: +5:2
}
}